Debian Codegraph @

t/txinfo-makeinfo-error-no-clobber.sh

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17 # Make sure info files survive makeinfo errors.
18
19 required=makeinfo
20 . test-init.shscip-shell source . . `test-init.sh`.
21
22 echoscip-shell system . . echo. AC_OUTPUT >> configure.ac
23
24 catscip-shell system . . cat. > Makefile.am << 'END'
25 info_TEXINFOS = main.texi sub/main.texi
26 END
27
28 mkdirscip-shell system . . mkdir. sub
29
30 catscip-shell system . . cat. > main.texi << 'END'
31 \input texinfo
32 @setfilename main.info
33 @settitle main
34 @node Top
35 Hello walls.
36 @bye
37 END
38
39 cpscip-shell system . . cp. main.texi sub/main.texi
40
41 $ACLOCAL
42 $AUTOMAKE --add-missing
43 $AUTOCONF
44
45 ./configure
46 $MAKE
47
48 # Feign more info files.
49 : > main.info-1
50 : > sub/main.info-1
51
52 # Break main.texi.
53 $sleep
54 cpscip-shell system . . cp. main.texi main.old
55 catscip-shell system . . cat. > main.texi << 'END'
56 \input texinfo
57 @setfilename main.info
58 @settitle main
59 @node Top
60 @unknown_macro{Hello walls.}
61 @bye
62 END
63
64 # makeinfo will bail out, but we should conserve the old info files.
65 $MAKE && exit 1
66 testscip-shell system . . test. -f main.info
67 testscip-shell system . . test. -f main.info-1
68
69 # Restore main.texi, and break sub/main.texi.
70 cpscip-shell system . . cp. main.texi sub/main.texi
71 mvscip-shell system . . mv. main.old main.texi
72 $MAKE && exit 1
73 testscip-shell system . . test. -f main.info
74 testscip-shell system . . test. ! -e main.info-1
75 testscip-shell system . . test. -f sub/main.info
76 testscip-shell system . . test. -f sub/main.info-1
77
78 :