www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/20/05:08:41

Date: Tue, 20 Jul 1999 12:03:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: configuring CVS binutils
In-Reply-To: <199907190421.EAA68866@out5.ibm.net>
Message-ID: <Pine.SUN.3.91.990720120309.4115K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019