]> git.saurik.com Git - bison.git/blame - djgpp/config.sed
regen
[bison.git] / djgpp / config.sed
CommitLineData
db0dcbf3 1# DJGPP specific configuration file.
7c799348 2# Sed script for additional DJGPP specific editing
013cb7f4 3# of the configure script generated by autoconf 2.62.
7c799348 4
c932d613 5# Copyright (C) 2005-2012 Free Software Foundation, Inc.
db0dcbf3 6
f16b0819 7# This program is free software: you can redistribute it and/or modify
db0dcbf3 8# it under the terms of the GNU General Public License as published by
f16b0819 9# the Free Software Foundation, either version 3 of the License, or
db0dcbf3 10# (at your option) any later version.
f16b0819 11#
db0dcbf3
PE
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
f16b0819 16#
db0dcbf3 17# You should have received a copy of the GNU General Public License
f16b0819 18# along with this program. If not, see <http://www.gnu.org/licenses/>.
db0dcbf3 19
b36e835b 20
3768a1ae 21# Additional editing of Makefiles
013cb7f4
JMG
22/^eval sed.*ac_file_inputs.*tmp\/out \\$/ {
23:loop
24n
25/^$/!b loop
26a\
2c061cb0 27cat > "$tmp/subs-djgpp.sed" << eof_djgpp\
3768a1ae 28# DJGPP specific Makefile changes.\
b36e835b
JMG
29s,\\.deps,_deps,g\
30s,\\.libs,_libs,g\
31s,\\.new\\.,_new.,g\
32s,\\.old\\.,_old.,g\
33s,\\.tab\\.,_tab.,g\
34s,c++\\.at,cxx.at,g\
35s,c++\\.m4,cxx.m4,g\
a7309d7d 36s,c++-skel\\.m4,cxx-skel.m4,g\
b36e835b
JMG
37s,calc++,calcxx,g\
38s,scan-gram-c,c-scan-gram,g\
39s,scan-skel-c,c-scan-skel,g\
50a84377 40s,inttypes_,_inttypes,g\
38b5fb0c
JMG
41s,javacomp\\.sh\\.in,javacomp.sh-in,g\
42s,javaexec\\.sh\\.in,javaexec.sh-in,g\
43s,yacc\\.1\\.in,yacc.1-in,g\
44s,bench\\.pl\\.in,bench.pl-in,g\
b36e835b
JMG
45s,Makefile\\.am\\.in,Makefile.am-in,g\
46s,Makefile\\.in\\.in,Makefile.in-in,g\
47/^\\.y\\.c:/,/^$/ {\
48 /\\\$(YACCCOMPILE)/ {\
49 a\\\\\
50 -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\\\
3768a1ae 51 -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
3768a1ae 52 }\
b36e835b
JMG
53}\
54/^libbison.a:/ i\\\\\
55\\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\\\
56subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\\\
3768a1ae 57 \\$(COMPILE) -c \\$<\
b36e835b
JMG
58/^yacc:/ i\\\\\
59yacc.bat:\\\\\
3768a1ae
JMG
60 echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >\\$@\
61/^bin_SCRIPTS =/s/$/ yacc.bat/\
b36e835b 62/^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/\
38b5fb0c
JMG
63/cross-options.texi:/,/^$/ s|bison|&.exe|g\
64/^\\.x\\.1:/,/^$/ s|\\$program|&.exe|g\
b36e835b 65eof_djgpp\
2c061cb0 66sed -f "\$tmp/subs-djgpp.sed" \$tmp/out > \$tmp/out.djgpp\
b36e835b 67mv -f \$tmp/out.djgpp \$tmp/out
013cb7f4 68}
3768a1ae
JMG
69
70# Makefile.in.in is renamed to Makefile.in-in.
b36e835b
JMG
71/ac_config_files=/ {
72 /runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|
73 s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|
38b5fb0c
JMG
74 s|javacomp\.sh\.in|javacomp.sh-in|
75 s|javaexec\.sh\.in|javaexec.sh-in|
76 s|doc/yacc\.1|&:doc/yacc.1-in|
77 s|etc/bench.pl|&:etc/bench.pl-in|
b36e835b
JMG
78}
79
80/CONFIG_FILES=/ {
81 /runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|2
82 s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|2
38b5fb0c
JMG
83 s|javacomp\.sh\.in|javacomp.sh-in|
84 s|javaexec\.sh\.in|javaexec.sh-in|
85 s|doc/yacc\.1|&:doc/yacc.1-in|2
86 s|etc/bench\.pl|&:etc/bench.pl-in|2
3768a1ae 87}
3768a1ae
JMG
88
89# We always use _deps and _libs instead of .deps and .libs, because
db0dcbf3 90# the latter is an invalid name on 8+3 MS-DOS file system. This makes
3768a1ae
JMG
91# the generated Makefiles good for every DJGPP installation, not only
92# the one where the package was configured (which could happen to be
93# a Windows box, where leading dots in file names are allowed).
02650b7f 94/^rmdir[ ]*\.tst/ i\
3768a1ae
JMG
95am__leading_dot=_
96
97# Replace (command) > /dev/null with `command > /dev/null`, since
98# parenthesized commands always return zero status in the ported Bash,
99# even if the named command doesn't exist
100/if ([^|;`]*null/{
101 s,(,`,
102 s,),,
02650b7f 103 /null[ ]*2>&1/ s,2>&1,&`,
3768a1ae
JMG
104 /null.*null/ s,null.*null,&`,
105 /null.*null/ !{
02650b7f 106 /null[ ]*2>&1/ !s,null,&`,
3768a1ae
JMG
107 }
108}
109
110# DOS-style absolute file names should be supported as well
111/\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
112
3768a1ae
JMG
113# The following two items are changes needed for configuring
114# and compiling across partitions.
115# 1) The given srcdir value is always translated from the
116# "x:" syntax into "/dev/x" syntax while we run configure.
02650b7f 117/^[ ]*-srcdir=\*.*$/ a\
3768a1ae
JMG
118 ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
119/set X `ls -Lt \$srcdir/ i\
120 if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
121 srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
122 fi
123
124# Autoconf 2.52e generated configure scripts
125# write absolute paths into Makefiles and bison.in
126# making them useless for DJGPP installations for
127# which the package has not been configured for.
128/MISSING=/,/^$/ {
129 /^fi$/ a\
b36e835b 130am_missing_run=`echo "$am_missing_run" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
3768a1ae
JMG
131}
132/^install_sh=/a\
b36e835b 133install_sh=`echo "$install_sh" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
3768a1ae
JMG
134
135# This will only work if the assumption that the
136# testsuite is ran from the following path:
137# ${top_srcdir}/tests/testsuite.dir
138# holds. The explicit names are of no importance.
139# ../../. == ${top_srcdir}
b36e835b
JMG
140#/^esac$/,/^ac_abs_srcdir=/ {
141/^ac_abs_srcdir=/ i\
142ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
143ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
144ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`
145#ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`
146/^ac_abs_srcdir=/ a\
147for dj_dir in $ac_abs_builddir $ac_abs_top_builddir $ac_abs_top_srcdir $ac_abs_srcdir\
148do\
149 ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%//%/%g"`\
150 ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%//%/%g"`\
151 ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%//%/%g"`\
152 ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%//%/%g"`\
153done
db0dcbf3 154
3768a1ae
JMG
155# Add DJGPP version information.
156/^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/
157
158# We need makeinfo to make the html formated docs.
02650b7f 159/\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,,
3768a1ae
JMG
160
161# The path to the FORTRAN compiler and libraries
162# shall contain no absolute path reference so it
163# will be good for all djgpp installations.
164/^FLIBS="\$ac_cv_flibs"/ i\
165ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
166ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
167
2c061cb0
JMG
168# Autoconf generated configure scripts write absolute
169# paths of certain header files into Makefiles making
170# them useless for DJGPP installations for which the
171# package has not been configured for.
172/^.*echo "\$as_me:\$LINENO: result: \$gl_cv_absolute_.*$/ {
173h
174s,^.*\(gl_cv_absolute_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
175G
176}
50a84377
JMG
177/^.*echo "\$as_me:\$LINENO: result: \$gl_cv_full_.*$/ {
178h
179s,^.*\(gl_cv_full_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
180G
181}
2c061cb0 182
3768a1ae 183# The following is not a valid DOS file name
db0dcbf3 184s/calc++/calcxx/g
013cb7f4
JMG
185
186# The CR test for awk does not work for DJGPP.
187/^ac_cs_awk_cr=/,/^$/ {
188 /^fi$/ a\
189ac_cs_awk_cr=$ac_cr
190}