Mail Archives: djgpp-workers/1999/07/20/05:08:41
On Mon, 19 Jul 1999, Mark E. wrote:
> echo "Changing y.tab to y_tab ... "
Isn't it better to patch the configure script itself so that it would
perform these transformations? The advantage is that you don't need
to mention explicitly the subdirectories:
> for fix_dir in \
> ./binutils \
> ./gas \
> ./ld
> do
The subdirectories might change in some future version, but the
configure script performs its editing in all of them automatically.
Another problem with patching Makefile.in's is that it breaks the
possibility of building Binutils from another directory, e.g. when the
sources are on a CD-ROM.
You can patch the configure script with a simple Sed script, like
this:
/ac_given_INSTALL=/,/^CEOF/ {
/^s%@LIBTOOL@%/a\
/TEXINPUTS=/s,:,\\\\\\\\\\\\\\;,g\
s,po2tbl\\.sed\\.in,po2tblsed.in,g\
s,Makefile\\.in\\.in,Makefile.in-in,g\
s,y\\.tab\\.in,y_tab.in,g
}
Note that the above also solves some additional problems in
Makefile.in's typical to GNU projects, which your script didn't
handle. (For the tricks with po2tblsed and Makefile.in-in to work,
you need to rename them in configure.bat.)
Since Binutils have a configure script in each subdirectory, you will
need to insert a script that does the above, with suitable escaping,
into the top-level configure script.
> sed -e 's%y\.tab%y_tab%g' ./Makefile.in > $TMPFILE
> update ${TMPFILE} ./Makefile.in
It is usually better to "touch -r Makefile.ori Makefile.in" after such
patching, since some packages have dependencies that include
Makefile.in, and will produce undesirable side-effects if the time
stamp of Makefile.in changes.
And while at that, I have two comments about Binutils 2.9.1:
- The top-level configure script searches for the shell, but only
for the win32 environment. Won't it be a good diea to make it do
that for DJGPP as well?
- What do people think about enabling more targets in the DJGPP
build? It seems that having support for ELF and PE cannot
possibly hurt anything, and might be useful for using/analyzing
object files created by Linux/Cygwin/Mingw32.
- Raw text -