mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
Made backup of config.make before sed'ing
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1026 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
d59de3229a
commit
2fbf70965c
@ -13,29 +13,29 @@ will have Glibc default to using /lib and /usr/lib which is fine
|
|||||||
right now).</para>
|
right now).</para>
|
||||||
|
|
||||||
<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
|
<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
|
||||||
../glibc-&glibc-version;/malloc/Makefile > tmp~:</userinput> This sed command
|
malloc/Makefile > tmp~:</userinput> This sed command
|
||||||
searches through <filename>../glibc-&glibc-version;/malloc/Makefile</filename> and
|
searches through <filename>malloc/Makefile</filename> and
|
||||||
converts all occurances of <filename>$(PERL)</filename> to
|
converts all occurances of <filename>$(PERL)</filename> to
|
||||||
<filename>/usr/bin/perl</filename>. The output is then written to the
|
<filename>/usr/bin/perl</filename>. The output is then written to the
|
||||||
file <filename>tmp~</filename>. This is done because Glibc can't
|
file <filename>tmp~</filename>. This is done because Glibc can't
|
||||||
autodetect perl since it's not installed yet at the time when we install
|
autodetect perl since it's not installed yet at the time when we install
|
||||||
Glibc.</para>
|
Glibc.</para>
|
||||||
|
|
||||||
<para><userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile:</userinput> The file
|
<para><userinput>mv -f tmp~ malloc/Makefile:</userinput> The file
|
||||||
<filename>tmp~</filename> is now moved back to
|
<filename>tmp~</filename> is now moved back to
|
||||||
<filename>../glibc-&glibc-version;/malloc/Makefile</filename>. We do this because
|
<filename>malloc/Makefile</filename>. We do this because
|
||||||
when using sed, we can't write straight back to this file so we need to
|
when using sed, we can't write straight back to this file so we need to
|
||||||
use a temporary file in between.</para>
|
use a temporary file in between.</para>
|
||||||
|
|
||||||
<para><userinput>sed 's/root/0' ../glibc-&glibc-version;/login/Makefile >
|
<para><userinput>sed 's/root/0' login/Makefile >
|
||||||
tmp~:</userinput> This sed command replaces all occurances of
|
tmp~:</userinput> This sed command replaces all occurances of
|
||||||
<filename>root</filename> in
|
<filename>root</filename> in
|
||||||
<filename>../glibc-&glibc-version;/login/Makefile</filename> with 0. This is
|
<filename>login/Makefile</filename> with 0. This is
|
||||||
because as we don't have glibc on the LFS system yet, usernames can't
|
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
|
be resolved to their user id's. Therefore, we replace the username
|
||||||
root with the id 0. </para>
|
root with the id 0. </para>
|
||||||
|
|
||||||
<para><userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the
|
<para><userinput>mv -f tmp~ login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the
|
||||||
edited Makefile and then copying it back over the original.</para>
|
edited Makefile and then copying it back over the original.</para>
|
||||||
|
|
||||||
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
|
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
|
||||||
|
@ -10,20 +10,21 @@ would do.</para>
|
|||||||
|
|
||||||
<para><screen><userinput>mknod -m 0666 /dev/null c 1 3 &&</userinput>
|
<para><screen><userinput>mknod -m 0666 /dev/null c 1 3 &&</userinput>
|
||||||
<userinput>touch /etc/ld.so.conf &&</userinput>
|
<userinput>touch /etc/ld.so.conf &&</userinput>
|
||||||
|
<userinput>cp -f malloc/Makefile \</userinput>
|
||||||
|
<userinput> malloc/Makefile.backup &&</userinput>
|
||||||
|
<userinput>sed 's%\$(PERL)%/usr/bin/perl%' \</userinput>
|
||||||
|
<userinput> malloc/Makefile > tmp~ &&</userinput>
|
||||||
|
<userinput>mv -f tmp~ malloc/Makefile &&</userinput>
|
||||||
|
<userinput>cp -f login/Makefile \</userinput>
|
||||||
|
<userinput> login/Makefile.backup &&</userinput>
|
||||||
|
<userinput>sed 's/root/0/' login/Makefile > tmp~ &&</userinput>
|
||||||
|
<userinput>mv -f tmp~ login/Makefile &&</userinput>
|
||||||
<userinput>mkdir ../glibc-build &&</userinput>
|
<userinput>mkdir ../glibc-build &&</userinput>
|
||||||
<userinput>cd ../glibc-build &&</userinput>
|
<userinput>cd ../glibc-build &&</userinput>
|
||||||
<userinput>cp -f ../glibc-&glibc-version;/malloc/Makefile \</userinput>
|
|
||||||
<userinput> ../glibc-&glibc-version;/malloc/Makefile.backup &&</userinput>
|
|
||||||
<userinput>sed 's%\$(PERL)%/usr/bin/perl%' \</userinput>
|
|
||||||
<userinput> ../glibc-&glibc-version;/malloc/Makefile > tmp~ &&</userinput>
|
|
||||||
<userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput>
|
|
||||||
<userinput>cp -f ../glibc-&glibc-version;/login/Makefile \</userinput>
|
|
||||||
<userinput> ../glibc-&glibc-version;/login/Makefile.backup &&</userinput>
|
|
||||||
<userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput>
|
|
||||||
<userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput>
|
|
||||||
<userinput>../glibc-&glibc-version;/configure \</userinput>
|
<userinput>../glibc-&glibc-version;/configure \</userinput>
|
||||||
<userinput> --prefix=/usr --enable-add-ons \</userinput>
|
<userinput> --prefix=/usr --enable-add-ons \</userinput>
|
||||||
<userinput> --libexecdir=/usr/bin &&</userinput>
|
<userinput> --libexecdir=/usr/bin &&</userinput>
|
||||||
|
<userinput>cp -f config.make config.make.backup &&</userinput>
|
||||||
<userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput>
|
<userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput>
|
||||||
<userinput> config.make > config.make~ &&</userinput>
|
<userinput> config.make > config.make~ &&</userinput>
|
||||||
<userinput>mv -f config.make~ config.make &&</userinput>
|
<userinput>mv -f config.make~ config.make &&</userinput>
|
||||||
|
Loading…
Reference in New Issue
Block a user