Updated buildscripts (2.2.7)

Erik-Jan ej.lfs at xs4all.nl
Wed Apr 9 16:13:37 PDT 2003

Ryan.Oliver at pha.com.au wrote:
>           2003-04-07 - Add a sed to modify zlib's Makefile.in to allow
>                        us to sensibly pass in LDFLAGS from the environment
Hi there,

I had a problem with the sed: at the time this is done, the sed uses
/bin/sed on the original host. Unfortunately, my host's sed-3.02 can't
cope with the \n in the first script. It just takes away the \, puts in
the 'n' and with that screws up the LDFLAGS-declaration.
I've found a solution to this, using the not much used /i command. It
really looks ugly, because my hosts version of sed only allows a '\'
behind the /i. But hey, it works :)) And a good thing: it also works
with sed-4.0.5, so i guess all versions between 3.02 and 4.0.5 will work

Once again, patch attached.

-------------- next part --------------
--- build-ch5-2.2.7.sh.orig	2003-04-09 22:39:10.000000000 +0000
+++ build-ch5-2.2.7.sh	2003-04-09 22:43:23.000000000 +0000
@@ -915,7 +915,10 @@
 # make LDFLAGS in Makefile.in empty and move existing LDFLAGS
 # to ZLIB_LDFLAGS. Append $(ZLIB_LDFLAGS) wherever $(LDFLAGS) exists
-sed -e 's at LDFLAGS=.*@LDFLAGS=\nZLIB_&@' \
+sed -e  's at LDFLAGS=.*@ZLIB_&@' \
+     -e '/ZLIB_LDFLAGS=/i\
     -e 's@$(LDFLAGS)@& $(ZLIB_LDFLAGS)@g' \
     Makefile.in-ORIG > Makefile.in

More information about the lfs-dev mailing list