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