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