]> git.saurik.com Git - bison.git/blob - djgpp/config.sed
(grammar_rule_check): Rewrite slightly to avoid GCC warnings.
[bison.git] / djgpp / config.sed
1 # Additional editing of Makefiles
2 /(echo[ ]*':t/ a\
3 # DJGPP specific Makefile changes.\
4 /^aliaspath * *=/s,:,";",g;t t\
5 /TEXINPUTS=/s,:,";",g;t t\
6 /PATH=/s,:,";",g;t t\
7 s,\\.deps,_deps,g;t t\
8 s,\\.new\\.,_new.,g;t t\
9 s,\\.old\\.,_old.,g;t t\
10 s,c++\\.at,cxx.at,g;t t\
11 s,c++\\.m4,cxx.m4,g;t t\
12 s,calc++,calcxx,g;t t\
13 s,scan-gram-c,c-scan-gram,g;t t\
14 s,scan-skel-c,c-scan-skel,g;t t\
15 s,Makefile\\.in\\.in,Makefile.in-in,g;t t\
16 s,Makefile\\.am\\.in,Makefile.am-in,g;t t\
17 s,(MAKEINFOFLAGS),& --no-split,\
18 /^install-info-am:/,/^$/ {\
19 /@list=/ s,\\\$(INFO_DEPS),& bison.i,\
20 /@for *file/ s,\\\$(INFO_DEPS),& bison.i,\
21 s,file-\\[0-9\\]\\[0-9\\],& \\$\\$file[0-9] \\$\\$file[0-9][0-9],\
22 }\
23 /^\\.y\\.c:/,/^$/ {\
24 /\\\$(YACCCOMPILE)/ {\
25 a\\\
26 -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\
27 -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
28 }\
29 }\
30 /^libbison.a:/ i\\\
31 \\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\
32 subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\
33 \\$(COMPILE) -c \\$<\
34 /^yacc:/ i\\\
35 yacc.bat:\\\
36 echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >\\$@\
37 /^bin_SCRIPTS =/s/$/ yacc.bat/\
38 /^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/
39
40
41 # Makefile.in.in is renamed to Makefile.in-in.
42 /ac_config_files=/,/_ACEOF/ {
43 s|po/Makefile\.in|&:po/Makefile.in-in|
44 }
45 /CONFIG_FILES=/ s|po/Makefile\.in|&:po/Makefile.in-in|2
46
47 # We always use _deps and _libs instead of .deps and .libs, because
48 # the latter is an invalid name on 8+3 MS-DOS filesystem. This makes
49 # the generated Makefiles good for every DJGPP installation, not only
50 # the one where the package was configured (which could happen to be
51 # a Windows box, where leading dots in file names are allowed).
52 s,\.deps,_deps,g
53 s,\.libs,_libs,g
54 /^rmdir[ ]*\.tst/ i\
55 am__leading_dot=_
56
57 # Replace (command) > /dev/null with `command > /dev/null`, since
58 # parenthesized commands always return zero status in the ported Bash,
59 # even if the named command doesn't exist
60 /if ([^|;`]*null/{
61 s,(,`,
62 s,),,
63 /null[ ]*2>&1/ s,2>&1,&`,
64 /null.*null/ s,null.*null,&`,
65 /null.*null/ !{
66 /null[ ]*2>&1/ !s,null,&`,
67 }
68 }
69
70 # DOS-style absolute file names should be supported as well
71 /\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
72
73 # Prevent the spliting of subs.sed.
74 # The sed script: subs.sed is split into 48 lines long files.
75 # This will produce sed scripts called subs-$ac_sed_frag.sed, where
76 # $ac_sed_frag is some unique number. This will not work if the splited
77 # sed script contains a multiple line sed command at line #48. In this
78 # case the first part of the multiple line sed command will be written
79 # at the end of one particular subs-$ac_sed_frag.sed and the rest of the
80 # sed command will be written at the begining of the next subs-$ac_sed_frag.sed
81 # making both sed script useless.
82 # This matches the configure script produced by Autoconf 2.57
83 /ac_max_sed_lines=[0-9]/ s,=.*$,=`sed -n "$=" $tmp/subs.sed`,
84
85 # The following two items are changes needed for configuring
86 # and compiling across partitions.
87 # 1) The given srcdir value is always translated from the
88 # "x:" syntax into "/dev/x" syntax while we run configure.
89 /^[ ]*-srcdir=\*.*$/ a\
90 ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
91 /set X `ls -Lt \$srcdir/ i\
92 if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
93 srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
94 fi
95
96 # Autoconf 2.52e generated configure scripts
97 # write absolute paths into Makefiles and bison.in
98 # making them useless for DJGPP installations for
99 # which the package has not been configured for.
100 /MISSING=/,/^$/ {
101 /^fi$/ a\
102 am_missing_run=`echo "$am_missing_run" | sed 's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'`
103 }
104 /^install_sh=/a\
105 install_sh=`echo "$install_sh" | sed 's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'`
106
107 # This will only work if the assumption that the
108 # testsuite is ran from the following path:
109 # ${top_srcdir}/tests/testsuite.dir
110 # holds. The explicit names are of no importance.
111 # ../../. == ${top_srcdir}
112 /\.)[ ]*ac_abs_builddir=/,/^esac$/ {
113 /^esac$/ a\
114 ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"`
115 }
116 /\.)[ ]*ac_abs_top_builddir=/,/^esac$/ {
117 /^esac$/ a\
118 ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"`
119 }
120 /\.)[ ]*ac_abs_srcdir=/,/^esac$/ {
121 /^esac$/ a\
122 ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"`
123 }
124 /\.)[ ]*ac_abs_top_srcdir=/,/^esac$/ {
125 /^esac$/ a\
126 ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"`
127 }
128
129 # Add DJGPP version information.
130 /^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/
131
132 # We need makeinfo to make the html formated docs.
133 /\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,,
134
135 # The path to the FORTRAN compiler and libraries
136 # shall contain no absolute path reference so it
137 # will be good for all djgpp installations.
138 /^FLIBS="\$ac_cv_flibs"/ i\
139 ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
140 ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
141
142 # The following is not a valid DOS file name
143 s/calc++/calcxx/g