From 2fbf70965c922ce90069aaa46d4e8adba43eb622 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 25 Aug 2001 01:04:51 +0000 Subject: Made backup of config.make before sed'ing git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1026 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/glibc-exp.xml | 14 +++++++------- chapter06/glibc-inst.xml | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml index ab2c09f53..c6c30fcf1 100644 --- a/chapter06/glibc-exp.xml +++ b/chapter06/glibc-exp.xml @@ -13,29 +13,29 @@ will have Glibc default to using /lib and /usr/lib which is fine right now). sed 's%\$(PERL)%/usr/bin/perl%' -../glibc-&glibc-version;/malloc/Makefile > tmp~: This sed command -searches through ../glibc-&glibc-version;/malloc/Makefile and +malloc/Makefile > tmp~: This sed command +searches through malloc/Makefile and converts all occurances of $(PERL) to /usr/bin/perl. The output is then written to the file tmp~. This is done because Glibc can't autodetect perl since it's not installed yet at the time when we install Glibc. -mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile: The file +mv -f tmp~ malloc/Makefile: The file tmp~ is now moved back to -../glibc-&glibc-version;/malloc/Makefile. We do this because +malloc/Makefile. We do this because when using sed, we can't write straight back to this file so we need to use a temporary file in between. -sed 's/root/0' ../glibc-&glibc-version;/login/Makefile > +sed 's/root/0' login/Makefile > tmp~: This sed command replaces all occurances of root in -../glibc-&glibc-version;/login/Makefile with 0. This is +login/Makefile with 0. This is because as we don't have glibc on the LFS system yet, usernames can't be resolved to their user id's. Therefore, we replace the username root with the id 0. -mv -f tmp~ ../glibc-&glibc-version;/login/Makefile: Asabove, we are using a temporary file (tmp~) to store the +mv -f tmp~ login/Makefile: Asabove, we are using a temporary file (tmp~) to store the edited Makefile and then copying it back over the original. --enable-add-ons: This enables the add-on that diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index ec3767dcb..3b5d40309 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -10,20 +10,21 @@ would do. mknod -m 0666 /dev/null c 1 3 && touch /etc/ld.so.conf && +cp -f malloc/Makefile \ +   malloc/Makefile.backup && +sed 's%\$(PERL)%/usr/bin/perl%' \ +   malloc/Makefile > tmp~ && +mv -f tmp~ malloc/Makefile && +cp -f login/Makefile \ +   login/Makefile.backup && +sed 's/root/0/' login/Makefile > tmp~ && +mv -f tmp~ login/Makefile && mkdir ../glibc-build && cd ../glibc-build && -cp -f ../glibc-&glibc-version;/malloc/Makefile \ -   ../glibc-&glibc-version;/malloc/Makefile.backup && -sed 's%\$(PERL)%/usr/bin/perl%' \ -   ../glibc-&glibc-version;/malloc/Makefile > tmp~ && -mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile && -cp -f ../glibc-&glibc-version;/login/Makefile \ -   ../glibc-&glibc-version;/login/Makefile.backup && -sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ && -mv -f tmp~ ../glibc-&glibc-version;/login/Makefile && ../glibc-&glibc-version;/configure \    --prefix=/usr --enable-add-ons \    --libexecdir=/usr/bin && +cp -f config.make config.make.backup && sed 's/cross-compiling = yes/cross-compiling = no/' \    config.make > config.make~ && mv -f config.make~ config.make && -- cgit v1.2.3-54-g00ecf