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