Ticket #956: no-tools.patch

File no-tools.patch, 75.4 KB (added by William Harrington, 10 years ago)

Original patch from Chris

  • BOOK/boot/common/boot-scripts.xml

    diff --git a/BOOK/boot/common/boot-scripts.xml b/BOOK/boot/common/boot-scripts.xml
    index f0bb2ae..9256e8f 100644
    a b  
    2727
    2828    <para os="a">Install the package:</para>
    2929
    30 <screen os="b"><userinput>make DESTDIR=/tools install-boot-scripts</userinput></screen>
     30<screen os="b"><userinput>make DESTDIR=${CLFS}/tools install-boot-scripts</userinput></screen>
    3131
    3232  <para os="c">The <command>setclock</command> script reads the time from the
    3333  hardware clock, also known as the BIOS or the Complementary Metal Oxide
     
    5151  to a value of <option>0</option> (zero) if the hardware clock
    5252  is <emphasis>not</emphasis> set to UTC time.</para>
    5353
    54 <screen os="f"><userinput>cat &gt; /tools/etc/sysconfig/clock &lt;&lt; "EOF"
     54<screen os="f"><userinput>cat &gt; ${CLFS}/tools/etc/sysconfig/clock &lt;&lt; "EOF"
    5555<literal># Begin /tools/etc/sysconfig/clock
    5656
    5757UTC=1
  • BOOK/boot/common/e2fsprogs.xml

    diff --git a/BOOK/boot/common/e2fsprogs.xml b/BOOK/boot/common/e2fsprogs.xml
    index 4d4bdd5..ce7dccb 100644
    a b  
    6464    href="../../final-system/common/e2fsprogs.xml"
    6565    xpointer="xpointer(//*[@os='i'])"/>
    6666
    67     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    68     href="../../final-system/common/e2fsprogs.xml"
    69     xpointer="xpointer(//*[@os='j'])"/>
     67<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    7068
    7169    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    7270    href="../../final-system/common/e2fsprogs.xml"
    7371    xpointer="xpointer(//*[@os='k'])"/>
    7472
    75     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    76     href="../../final-system/common/e2fsprogs.xml"
    77     xpointer="xpointer(//*[@os='l'])"/>
     73<screen os="l"><userinput>make DESTDIR=${CLFS} install-libs</userinput></screen>
    7874
    7975  </sect2>
    8076
  • BOOK/boot/common/eudev.xml

    diff --git a/BOOK/boot/common/eudev.xml b/BOOK/boot/common/eudev.xml
    index 132ffc7..952d3a8 100644
    a b  
    4040
    4141    <para os="g">Install the package:</para>
    4242
    43 <screen os="j"><userinput>make install</userinput></screen>
     43<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4444
    4545    <para os="i">Create a directory for storing firmware that can be
    4646    loaded by <command>udev</command>:</para>
    4747
    48 <screen os="k"><userinput>install -dv /tools/lib/firmware</userinput></screen>
     48<screen os="k"><userinput>install -dv ${CLFS}/tools/lib/firmware</userinput></screen>
    4949
    5050    <para os="r1">Create a dummy rule so that Eudev will name ethernet devices properly for the system.</para>
    5151
    5252<screen os="r2"><userinput>echo "# dummy, so that network is once again on eth*" \
    53 > /tools/etc/udev/rules.d/80-net-name-slot.rules</userinput></screen>
     53> ${CLFS}/tools/etc/udev/rules.d/80-net-name-slot.rules</userinput></screen>
    5454
    5555 </sect2>
    5656
  • BOOK/boot/common/kmod.xml

    diff --git a/BOOK/boot/common/kmod.xml b/BOOK/boot/common/kmod.xml
    index 283c8f6..b82f67c 100644
    a b sed '/dirname_default_prefix /s@/lib/modules@/tools&amp;@' \  
    6363    href="../../final-system/common/kmod.xml"
    6464    xpointer="xpointer(//*[@os='g'])"/>
    6565
    66 <screen os="h"><userinput>make install</userinput></screen>
     66<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6767
    6868    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    6969    href="../../final-system/common/kmod.xml"
    7070    xpointer="xpointer(//*[@os='i'])"/>
    7171
    72 <screen os="j"><userinput>ln -sfv kmod /tools/bin/lsmod
     72<screen os="j"><userinput>ln -sfv kmod ${CLFS}/tools/bin/lsmod
    7373for tool in depmod insmod modprobe modinfo rmmod; do
    74     ln -sv ../bin/kmod /tools/sbin/${tool}
     74    ln -sv ../bin/kmod ${CLFS}/tools/sbin/${tool}
    7575done</userinput></screen>
    7676
    7777  </sect2>
  • BOOK/boot/common/shadow.xml

    diff --git a/BOOK/boot/common/shadow.xml b/BOOK/boot/common/shadow.xml
    index 2add343..1b2aa0c 100644
    a b sed 's/\(^suidu*bins = \).*/\1/' src/Makefile.orig &gt; src/Makefile</userinput>  
    5252
    5353    <para os="l">Install the package:</para>
    5454
    55 <screen os="m"><userinput>make install</userinput></screen>
     55<screen os="m"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    5656
    5757  </sect2>
    5858
  • BOOK/boot/common/sysvinit.xml

    diff --git a/BOOK/boot/common/sysvinit.xml b/BOOK/boot/common/sysvinit.xml
    index eff26c7..7a3a576 100644
    a b make -C src CC="${CC}"</userinput></screen>  
    3838
    3939   <para os="e">Install the package:</para>
    4040
    41 <screen os="ad"><userinput>make -C src ROOT=/tools install</userinput></screen>
     41<screen os="ad"><userinput>make -C src ROOT=${CLFS}/tools install</userinput></screen>
    4242
    4343  </sect2>
    4444
    make -C src CC="${CC}"</userinput></screen>  
    5757    <para>Create a new file <filename>/tools/etc/inittab</filename> by running the
    5858    following:</para>
    5959
    60 <screen><userinput>cat &gt; /tools/etc/inittab &lt;&lt; "EOF"
     60<screen><userinput>cat &gt; ${CLFS}/tools/etc/inittab &lt;&lt; "EOF"
    6161<literal># Begin /tools/etc/inittab
    6262
    6363id:3:initdefault:
    EOF</userinput></screen>  
    8282    <filename>/tools/etc/inittab</filename>. If your system only has a serial
    8383    console skip the following command:</para>
    8484
    85 <screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
     85<screen><userinput>cat &gt;&gt; ${CLFS}/tools/etc/inittab &lt;&lt; "EOF"
    8686<literal>1:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty1 9600
    87872:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty2 9600
    88883:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty3 9600
    EOF</userinput></screen>  
    9595    <para>If your system has a serial console, run the following command to add
    9696    the entry to <filename>/tools/etc/inittab</filename>.</para>
    9797
    98 <screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
     98<screen><userinput>cat &gt;&gt; ${CLFS}/tools/etc/inittab &lt;&lt; "EOF"
    9999<literal>c0:12345:respawn:/tools/sbin/agetty --noclear 115200 ttyS0 vt100
    100100</literal>
    101101EOF</userinput></screen>
    102102
    103103   <para>Finally, add the end line to <filename>/tools/etc/inittab</filename>.</para>
    104104
    105 <screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
     105<screen><userinput>cat &gt;&gt; ${CLFS}/tools/etc/inittab &lt;&lt; "EOF"
    106106<literal># End /tools/etc/inittab</literal>
    107107EOF</userinput></screen>
    108108
  • BOOK/boot/mips/colo-build.xml

    diff --git a/BOOK/boot/mips/colo-build.xml b/BOOK/boot/mips/colo-build.xml
    index 93fd18b..b8f951f 100644
    a b make CROSS_COMPILE="${CLFS_TARGET}-" binary</userinput></screen>  
    5454    href="../../final-system/mips/colo.xml"
    5555    xpointer="xpointer(//*[@os='c'])"/>
    5656
    57 <screen os="ab"><userinput>cp -v chain/colo-chain.elf /tools/boot/vmlinux
    58 gzip -9 /tools/boot/vmlinux</userinput></screen>
     57<screen os="ab"><userinput>cp -v chain/colo-chain.elf ${CLFS}/tools/boot/vmlinux
     58gzip -9 ${CLFS}/tools/boot/vmlinux</userinput></screen>
    5959
    6060  </sect2>
    6161
  • BOOK/boot/mips/kernel.xml

    diff --git a/BOOK/boot/mips/kernel.xml b/BOOK/boot/mips/kernel.xml
    index dcf0f36..ac2425f 100644
    a b  
    7171    xpointer="xpointer(//*[@os='s'])"/>
    7272
    7373<screen><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \
    74    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     74   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    7575
    7676    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    7777    href="../../bootable/x86/kernel.xml"
    7878    xpointer="xpointer(//*[@os='s2'])"/>
    7979
    8080<screen><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \
    81    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     81   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8282
    8383    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8484    href="../x86/kernel.xml"
     
    8888    href="../x86/kernel.xml"
    8989    xpointer="xpointer(//*[@os='v'])"/>
    9090
    91 <screen><userinput>mkdir -pv /tools/boot
    92 cp -v vmlinux /tools/boot/vmlinux-&linux-version;
    93 gzip -9 /tools/boot/vmlinux-&linux-version;</userinput></screen>
     91<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     92cp -v vmlinux ${CLFS}/tools/boot/vmlinux-&linux-version;
     93gzip -9 ${CLFS}/tools/boot/vmlinux-&linux-version;</userinput></screen>
    9494
    9595    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    9696    href="../x86/kernel.xml"
  • BOOK/boot/mips64/kernel.xml

    diff --git a/BOOK/boot/mips64/kernel.xml b/BOOK/boot/mips64/kernel.xml
    index fea3b01..5b33427 100644
    a b  
    7575    xpointer="xpointer(//*[@os='s'])"/>
    7676
    7777<screen><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \
    78    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     78   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    7979
    8080    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8181    href="../../bootable/x86/kernel.xml"
    8282    xpointer="xpointer(//*[@os='s2'])"/>
    8383
    8484<screen><userinput>make ARCH=mips CROSS_COMPILE=${CLFS_TARGET}- \
    85    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     85   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8686
    8787    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8888    href="../x86/kernel.xml"
     
    9292    href="../x86/kernel.xml"
    9393    xpointer="xpointer(//*[@os='v'])"/>
    9494
    95 <screen><userinput>mkdir -pv /tools/boot
    96 cp -v vmlinux /tools/boot/vmlinux-&linux-version;
    97 gzip -9 /tools/boot/vmlinux-&linux-version;</userinput></screen>
     95<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     96cp -v vmlinux ${CLFS}/tools/boot/vmlinux-&linux-version;
     97gzip -9 ${CLFS}/tools/boot/vmlinux-&linux-version;</userinput></screen>
    9898
    9999    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    100100    href="../x86/kernel.xml"
  • BOOK/boot/ppc/kernel.xml

    diff --git a/BOOK/boot/ppc/kernel.xml b/BOOK/boot/ppc/kernel.xml
    index bd6eee9..53938a5 100644
    a b  
    7676    xpointer="xpointer(//*[@os='s'])"/>
    7777
    7878<screen><userinput>make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- \
    79    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     79   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    8080
    8181    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8282    href="../../bootable/x86/kernel.xml"
    8383    xpointer="xpointer(//*[@os='s2'])"/>
    8484
    8585<screen><userinput>make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- \
    86    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     86   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8787
    8888    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8989    href="../x86/kernel.xml"
     
    9393    href="../x86/kernel.xml"
    9494    xpointer="xpointer(//*[@os='v'])"/>
    9595
    96 <screen><userinput>mkdir -pv /tools/boot
    97 cp -v vmlinux /tools/boot/clfskernel-&linux-version;</userinput></screen>
     96<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     97cp -v vmlinux ${CLFS}/tools/boot/clfskernel-&linux-version;</userinput></screen>
    9898
    9999    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    100100    href="../x86/kernel.xml"
  • BOOK/boot/ppc64/e2fsprogs.xml

    diff --git a/BOOK/boot/ppc64/e2fsprogs.xml b/BOOK/boot/ppc64/e2fsprogs.xml
    index f05597e..4ee7bb4 100644
    a b make LIBUUID="-luuid" STATIC_LIBUUID="-luuid" LIBBLKID="-lblkid" \  
    7474
    7575    <para os="i">Install the e2fsck binary:</para>
    7676
    77 <screen os="j"><userinput>make install -C e2fsck</userinput></screen>
     77<screen os="j"><userinput>make DESTDIR=${CLFS} install -C e2fsck</userinput></screen>
    7878
    7979    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8080    href="../common/e2fsprogs.xml"
  • BOOK/boot/ppc64/kernel.xml

    diff --git a/BOOK/boot/ppc64/kernel.xml b/BOOK/boot/ppc64/kernel.xml
    index eb5e4bc..e632ed7 100644
    a b  
    7575    xpointer="xpointer(//*[@os='s'])"/>
    7676
    7777<screen><userinput>make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- \
    78    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     78   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    7979
    8080    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8181    href="../../bootable/x86/kernel.xml"
    8282    xpointer="xpointer(//*[@os='s2'])"/>
    8383
    8484<screen><userinput>make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- \
    85    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     85   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8686
    8787    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8888    href="../x86/kernel.xml"
     
    9292    href="../x86/kernel.xml"
    9393    xpointer="xpointer(//*[@os='v'])"/>
    9494
    95 <screen><userinput>mkdir -pv /tools/boot
    96 cp -v vmlinux /tools/boot/clfskernel-&linux-version;</userinput></screen>
     95<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     96cp -v vmlinux ${CLFS}/tools/boot/clfskernel-&linux-version;</userinput></screen>
    9797
    9898    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    9999    href="../x86/kernel.xml"
  • BOOK/boot/sparc/elftoaout.xml

    diff --git a/BOOK/boot/sparc/elftoaout.xml b/BOOK/boot/sparc/elftoaout.xml
    index 20cfe37..472eb01 100644
    a b  
    3636
    3737    <para>Install the package:</para>
    3838
    39 <screen><userinput>install -v -m 0755 -s elftoaout /cross-tools/bin</userinput></screen>
     39<screen><userinput>install -v -m 0755 -s elftoaout ${CLFS}/cross-tools/bin</userinput></screen>
    4040
    4141  </sect2>
    4242
  • BOOK/boot/sparc/kernel.xml

    diff --git a/BOOK/boot/sparc/kernel.xml b/BOOK/boot/sparc/kernel.xml
    index 588f51a..1580b1b 100644
    a b  
    7171    xpointer="xpointer(//*[@os='s'])"/>
    7272
    7373<screen><userinput>make ARCH=sparc CROSS_COMPILE=${CLFS_TARGET}- \
    74    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     74   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    7575
    7676    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    7777    href="../../bootable/x86/kernel.xml"
    7878    xpointer="xpointer(//*[@os='s2'])"/>
    7979
    8080<screen><userinput>make ARCH=sparc CROSS_COMPILE=${CLFS_TARGET}- \
    81    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     81   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8282
    8383    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8484    href="../x86/kernel.xml"
     
    8888    href="../x86/kernel.xml"
    8989    xpointer="xpointer(//*[@os='v'])"/>
    9090
    91 <screen><userinput>mkdir -pv /tools/boot
    92 cp -v vmlinux /tools/boot/clfskernel-&linux-version;</userinput></screen>
     91<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     92cp -v vmlinux ${CLFS}/tools/boot/clfskernel-&linux-version;</userinput></screen>
    9393
    9494    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    9595    href="../x86/kernel.xml"
  • BOOK/boot/sparc64/kernel.xml

    diff --git a/BOOK/boot/sparc64/kernel.xml b/BOOK/boot/sparc64/kernel.xml
    index a6de7d5..cd035e2 100644
    a b  
    7272    href="../x86/kernel.xml"
    7373    xpointer="xpointer(//*[@os='s'])"/>
    7474
    75 <screen><userinput>make ARCH=sparc64 INSTALL_MOD_PATH=/tools \
     75<screen><userinput>make ARCH=sparc64 INSTALL_MOD_PATH=${CLFS}/tools \
    7676   CROSS_COMPILE=${CLFS_TARGET}- modules_install</userinput></screen>
    7777
    7878    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     
    8080    xpointer="xpointer(//*[@os='s2'])"/>
    8181
    8282<screen><userinput>make ARCH=sparc64 CROSS_COMPILE=${CLFS_TARGET}- \
    83    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     83   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8484
    8585    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8686    href="../x86/kernel.xml"
     
    9090    href="../x86/kernel.xml"
    9191    xpointer="xpointer(//*[@os='v'])"/>
    9292
    93 <screen><userinput>mkdir -pv /tools/boot
    94 cp -v vmlinux /tools/boot/clfskernel-&linux-version;</userinput></screen>
     93<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     94cp -v vmlinux ${CLFS}/tools/boot/clfskernel-&linux-version;</userinput></screen>
    9595
    9696    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    9797    href="../x86/kernel.xml"
  • BOOK/boot/x86/kernel.xml

    diff --git a/BOOK/boot/x86/kernel.xml b/BOOK/boot/x86/kernel.xml
    index c8328f0..bf0fa13 100644
    a b  
    7979    xpointer="xpointer(//*[@os='s'])"/>
    8080
    8181<screen><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \
    82     INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     82    INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    8383
    8484    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8585    href="../../bootable/x86/kernel.xml"
    8686    xpointer="xpointer(//*[@os='s2'])"/>
    8787
    8888<screen><userinput>make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- \
    89    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     89   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    9090
    9191    <para os="u">After kernel compilation is complete, additional steps are
    9292    required to complete the installation. Some files need to be copied to
     
    9494
    9595    <para os="v">Issue the following commands to install the kernel:</para>
    9696
    97 <screen><userinput>mkdir -pv /tools/boot
    98 cp -v arch/i386/boot/bzImage /tools/boot/vmlinuz-clfs-&linux-version;</userinput></screen>
     97<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     98cp -v arch/i386/boot/bzImage ${CLFS}/tools/boot/vmlinuz-clfs-&linux-version;</userinput></screen>
    9999
    100100    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    101101    href="../../bootable/x86/kernel.xml"
    102102    xpointer="xpointer(//*[@os='w'])"/>
    103103
    104 <screen os="w1"><userinput>cp -v System.map /tools/boot/System.map-&linux-version;</userinput></screen>
     104<screen os="w1"><userinput>cp -v System.map ${CLFS}/tools/boot/System.map-&linux-version;</userinput></screen>
    105105
    106106    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    107107    href="../../bootable/x86/kernel.xml"
    108108    xpointer="xpointer(//*[@os='x'])"/>
    109109
    110 <screen os="x1"><userinput>cp -v .config /tools/boot/config-&linux-version;</userinput></screen>
     110<screen os="x1"><userinput>cp -v .config ${CLFS}/tools/boot/config-&linux-version;</userinput></screen>
    111111
    112112  </sect2>
    113113
  • BOOK/boot/x86_64/kernel.xml

    diff --git a/BOOK/boot/x86_64/kernel.xml b/BOOK/boot/x86_64/kernel.xml
    index 067c126..5693af7 100644
    a b  
    7575    xpointer="xpointer(//*[@os='s'])"/>
    7676
    7777<screen><userinput>make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- \
    78    INSTALL_MOD_PATH=/tools modules_install</userinput></screen>
     78   INSTALL_MOD_PATH=${CLFS}/tools modules_install</userinput></screen>
    7979
    8080    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8181    href="../../bootable/x86/kernel.xml"
    8282    xpointer="xpointer(//*[@os='s2'])"/>
    8383
    8484<screen><userinput>make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- \
    85    INSTALL_MOD_PATH=/tools firmware_install</userinput></screen>
     85   INSTALL_MOD_PATH=${CLFS}/tools firmware_install</userinput></screen>
    8686
    8787    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8888    href="../x86/kernel.xml"
     
    9292    href="../x86/kernel.xml"
    9393    xpointer="xpointer(//*[@os='v'])"/>
    9494
    95 <screen><userinput>mkdir -pv /tools/boot
    96 cp -v arch/x86_64/boot/bzImage /tools/boot/vmlinuz-clfs-&linux-version;</userinput></screen>
     95<screen><userinput>mkdir -pv ${CLFS}/tools/boot
     96cp -v arch/x86_64/boot/bzImage ${CLFS}/tools/boot/vmlinuz-clfs-&linux-version;</userinput></screen>
    9797
    9898    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    9999    href="../x86/kernel.xml"
  • BOOK/cross-tools/64/glibc.xml

    diff --git a/BOOK/cross-tools/64/glibc.xml b/BOOK/cross-tools/64/glibc.xml
    index 49db731..4895ac1 100644
    a b  
    5959      ../glibc-&glibc-version;/configure --prefix=/tools \
    6060      --host=${CLFS_TARGET} --build=${CLFS_HOST} \
    6161      --disable-profile --with-tls --enable-kernel=2.6.32 --with-__thread \
    62       --with-binutils=/cross-tools/bin --with-headers=/tools/include \
     62      --with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/tools/include \
    6363      --enable-obsolete-rpc --cache-file=config.cache</userinput></screen>
    6464
    6565    <variablelist os="dg">
  • BOOK/cross-tools/common/bc.xml

    diff --git a/BOOK/cross-tools/common/bc.xml b/BOOK/cross-tools/common/bc.xml
    index c957f35..640a497 100644
    a b  
    2424
    2525    <para>Prepare Bc for compilation:</para>
    2626
    27 <screen><userinput>./configure --prefix=/cross-tools</userinput></screen>
     27<screen><userinput>./configure --prefix=${CLFS}/cross-tools</userinput></screen>
    2828
    2929    <variablelist>
    3030      <title>The meaning of the configure option:</title>
    3131
    3232      <varlistentry>
    33         <term><parameter>--prefix=/cross-tools</parameter></term>
     33        <term><parameter>--prefix=${CLFS}/cross-tools</parameter></term>
    3434        <listitem>
    3535          <para>This tells the configure script to prepare to install the
    36           package in the <filename class="directory">/cross-tools</filename>
     36          package in the <filename class="directory">${CLFS}/cross-tools</filename>
    3737          directory.</para>
    3838        </listitem>
    3939      </varlistentry>
  • BOOK/cross-tools/common/binutils-32.xml

    diff --git a/BOOK/cross-tools/common/binutils-32.xml b/BOOK/cross-tools/common/binutils-32.xml
    index 1455c8f..fde95e5 100644
    a b  
    4949    xpointer="xpointer(//*[@os='i'])"/>
    5050
    5151<screen os="bc"><userinput>AR=ar AS=as ../binutils-&binutils-dir;/configure \
    52     --prefix=/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
     52    --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    5353    --with-sysroot=${CLFS} --with-lib-path=/tools/lib --disable-nls \
    5454    --disable-static --disable-multilib</userinput></screen>
    5555
  • BOOK/cross-tools/common/binutils.xml

    diff --git a/BOOK/cross-tools/common/binutils.xml b/BOOK/cross-tools/common/binutils.xml
    index d9e62af..82c71de 100644
    a b  
    4949    xpointer="xpointer(//*[@os='i'])"/>
    5050
    5151<screen os="bc"><userinput>AR=ar AS=as ../binutils-&binutils-dir;/configure \
    52     --prefix=/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
     52    --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    5353    --with-sysroot=${CLFS} --with-lib-path=/tools/lib --disable-nls \
    5454    --disable-static --enable-64-bit-bfd --disable-multilib</userinput></screen>
    5555
  • BOOK/cross-tools/common/cloog.xml

    diff --git a/BOOK/cross-tools/common/cloog.xml b/BOOK/cross-tools/common/cloog.xml
    index 75810c0..3552c43 100644
    a b  
    2424
    2525    <para os="a">Prepare CLooG for compilation:</para>
    2626
    27 <screen os="b"><userinput>LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    28     ./configure --prefix=/cross-tools --disable-static \
    29     --with-gmp-prefix=/cross-tools --with-isl-prefix=/cross-tools</userinput></screen>
     27<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     28    ./configure --prefix=${CLFS}/cross-tools --disable-static \
     29    --with-gmp-prefix=${CLFS}/cross-tools --with-isl-prefix=${CLFS}/cross-tools</userinput></screen>
    3030
    3131    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    3232    href="../../final-system/common/cloog.xml"
  • BOOK/cross-tools/common/file.xml

    diff --git a/BOOK/cross-tools/common/file.xml b/BOOK/cross-tools/common/file.xml
    index b3cae0d..631560a 100644
    a b  
    2424
    2525    <para>Prepare File for compilation:</para>
    2626
    27 <screen><userinput>./configure --prefix=/cross-tools --disable-static</userinput></screen>
     27<screen><userinput>./configure --prefix=${CLFS}/cross-tools --disable-static</userinput></screen>
    2828
    2929    <variablelist>
    3030      <title>The meaning of the new configure option:</title>
  • BOOK/cross-tools/common/gcc-final.xml

    diff --git a/BOOK/cross-tools/common/gcc-final.xml b/BOOK/cross-tools/common/gcc-final.xml
    index 2acd30f..3e03d63 100644
    a b  
    5858    href="gcc-static.xml"
    5959    xpointer="xpointer(//*[@os='h'])"/>
    6060
    61 <screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    62     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     61<screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     62    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
    6363    --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
    6464    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    6565    --with-native-system-header-dir=/tools/include --disable-nls \
    6666    --enable-shared --disable-static --enable-languages=c,c++ \
    6767    --enable-__cxa_atexit --enable-c99 \
    6868    --enable-long-long --enable-threads=posix --disable-multilib \
    69     --with-mpc=/cross-tools --with-mpfr=/cross-tools --with-gmp=/cross-tools \
    70     --with-cloog=/cross-tools --with-isl=/cross-tools --with-system-zlib \
     69    --with-mpc=${CLFS}/cross-tools --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
     70    --with-cloog=${CLFS}/cross-tools --with-isl=${CLFS}/cross-tools --with-system-zlib \
    7171    --enable-checking=release --enable-libstdcxx-time</userinput></screen>
    7272
    7373    <variablelist os="bg">
  • BOOK/cross-tools/common/gcc-static.xml

    diff --git a/BOOK/cross-tools/common/gcc-static.xml b/BOOK/cross-tools/common/gcc-static.xml
    index dd81822..e1d2e9a 100644
    a b echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define STANDARD_STARTFILE_PREFI  
    4646    <para os="t1">We will create a dummy <filename>limits.h</filename> so
    4747    the build will not use the one provided by the host distro:</para>
    4848
    49 <screen os="t2"><userinput>touch /tools/include/limits.h</userinput></screen>
     49<screen os="t2"><userinput>touch ${CLFS}/tools/include/limits.h</userinput></screen>
    5050
    5151    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    5252    href="../../final-system/common/gcc.xml"
    echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define STANDARD_STARTFILE_PREFI  
    6060    href="../../final-system/common/gcc.xml"
    6161    xpointer="xpointer(//*[@os='h'])"/>
    6262
    63 <screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    64     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     63<screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     64    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
    6565    --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    6666    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    6767    --with-native-system-header-dir=/tools/include --disable-nls \
    68     --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools \
    69     --with-isl=/cross-tools --with-cloog=/cross-tools --with-mpc=/cross-tools \
     68    --disable-shared --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
     69    --with-isl=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools --with-mpc=${CLFS}/cross-tools \
    7070    --without-headers --with-newlib --disable-decimal-float --disable-libgomp \
    7171    --disable-libmudflap --disable-libssp --disable-libatomic --disable-libitm \
    7272    --disable-libsanitizer --disable-libquadmath --disable-threads \
    echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define STANDARD_STARTFILE_PREFI  
    197197    <para os="as">Copy <filename class="headerfile">libiberty.h</filename> to
    198198    <filename class="directory">/tools/include</filename> directory:</para>
    199199
    200 <screen os="at"><userinput>cp -v ../gcc-&gcc-version;/include/libiberty.h /tools/include</userinput></screen>
     200<screen os="at"><userinput>cp -v ../gcc-&gcc-version;/include/libiberty.h ${CLFS}/tools/include</userinput></screen>
    201201
    202202  </sect2>
    203203
  • BOOK/cross-tools/common/glibc.xml

    diff --git a/BOOK/cross-tools/common/glibc.xml b/BOOK/cross-tools/common/glibc.xml
    index d25feda..dad2ecc 100644
    a b sed 's/\\$$(pwd)/`pwd`/' timezone/Makefile.orig &gt; timezone/Makefile</userinpu  
    5555    ../glibc-&glibc-version;/configure --prefix=/tools \
    5656    --host=${CLFS_TARGET} --build=${CLFS_HOST} \
    5757    --disable-profile --with-tls --enable-kernel=2.6.32 \
    58     --with-__thread --with-binutils=/cross-tools/bin \
    59     --with-headers=/tools/include --enable-obsolete-rpc \
     58    --with-__thread --with-binutils=${CLFS}/cross-tools/bin \
     59    --with-headers=${CLFS}/tools/include --enable-obsolete-rpc \
    6060    --cache-file=config.cache</userinput></screen>
    6161
    6262    <variablelist os="dg">
    sed 's/\\$$(pwd)/`pwd`/' timezone/Makefile.orig &gt; timezone/Makefile</userinpu  
    126126      </varlistentry>
    127127
    128128      <varlistentry os="dg9">
    129         <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
     129        <term><parameter>--with-binutils=${CLFS}/cross-tools/bin</parameter></term>
    130130        <listitem>
    131131          <para>This tells Glibc to use the Binutils that are specific to
    132132          our target architecture.</para>
    sed 's/\\$$(pwd)/`pwd`/' timezone/Makefile.orig &gt; timezone/Makefile</userinpu  
    134134      </varlistentry>
    135135
    136136      <varlistentry os="dg10">
    137         <term><parameter>--with-headers=/tools/include</parameter></term>
     137        <term><parameter>--with-headers=${CLFS}/tools/include</parameter></term>
    138138        <listitem>
    139139          <para>This tells Glibc to compile itself against the headers
    140140          recently installed to the <filename class="directory">/tools</filename>
    sed 's/\\$$(pwd)/`pwd`/' timezone/Makefile.orig &gt; timezone/Makefile</userinpu  
    178178
    179179    <para os="dm">Install the package:</para>
    180180
    181 <screen os="dn"><userinput>make install</userinput></screen>
     181<screen os="dn"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    182182
    183183  </sect2>
    184184
  • BOOK/cross-tools/common/gmp.xml

    diff --git a/BOOK/cross-tools/common/gmp.xml b/BOOK/cross-tools/common/gmp.xml
    index 7770774..be11bea 100644
    a b  
    4141
    4242    <para os="a">Prepare GMP for compilation:</para>
    4343
    44 <screen os="b"><userinput>./configure --prefix=/cross-tools --enable-cxx \
     44<screen os="b"><userinput>./configure --prefix=${CLFS}/cross-tools --enable-cxx \
    4545    --disable-static</userinput></screen>
    4646
    4747    <variablelist os="b1">
  • BOOK/cross-tools/common/isl.xml

    diff --git a/BOOK/cross-tools/common/isl.xml b/BOOK/cross-tools/common/isl.xml
    index 509695b..8f592c3 100644
    a b  
    2424
    2525    <para os="a">Prepare ISL for compilation:</para>
    2626
    27 <screen os="b"><userinput>LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    28 ./configure --prefix=/cross-tools --disable-static \
    29     --with-gmp-prefix=/cross-tools</userinput></screen>
     27<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     28./configure --prefix=${CLFS}/cross-tools --disable-static \
     29    --with-gmp-prefix=${CLFS}/cross-tools</userinput></screen>
    3030
    3131    <para os="c">Compile the package:</para>
    3232
  • BOOK/cross-tools/common/m4.xml

    diff --git a/BOOK/cross-tools/common/m4.xml b/BOOK/cross-tools/common/m4.xml
    index f8d87d5..a1ae858 100644
    a b  
    2424
    2525    <para os="a">Prepare M4 for compilation:</para>
    2626
    27 <screen os="b"><userinput>./configure --prefix=/cross-tools</userinput></screen>
     27<screen os="b"><userinput>./configure --prefix=${CLFS}/cross-tools</userinput></screen>
    2828
    2929    <para os="c">Compile the package:</para>
    3030
  • BOOK/cross-tools/common/mpc.xml

    diff --git a/BOOK/cross-tools/common/mpc.xml b/BOOK/cross-tools/common/mpc.xml
    index 4e632c1..bb3319a 100644
    a b  
    2424
    2525    <para os="a">Prepare MPC for compilation:</para>
    2626
    27 <screen os="b"><userinput>LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    28 ./configure --prefix=/cross-tools --disable-static \
    29     --with-gmp=/cross-tools --with-mpfr=/cross-tools</userinput></screen>
     27<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     28./configure --prefix=${CLFS}/cross-tools --disable-static \
     29    --with-gmp=${CLFS}/cross-tools --with-mpfr=${CLFS}/cross-tools</userinput></screen>
    3030
    3131    <para os="c">Compile the package:</para>
    3232
  • BOOK/cross-tools/common/mpfr.xml

    diff --git a/BOOK/cross-tools/common/mpfr.xml b/BOOK/cross-tools/common/mpfr.xml
    index 21f7115..5448ef5 100644
    a b  
    3232
    3333    <para os="a">Prepare MPFR for compilation:</para>
    3434
    35 <screen os="b"><userinput>LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    36 ./configure --prefix=/cross-tools \
    37     --disable-static --with-gmp=/cross-tools</userinput></screen>
     35<screen os="b"><userinput>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     36./configure --prefix=${CLFS}/cross-tools \
     37    --disable-static --with-gmp=${CLFS}/cross-tools</userinput></screen>
    3838
    3939    <variablelist os="b1">
    4040      <title>The meaning of the new configure options:</title>
    4141
    4242      <varlistentry>
    43         <term><parameter>LDFLAGS="-Wl,-rpath,/cross-tools/lib"</parameter></term>
     43        <term><parameter>LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib"</parameter></term>
    4444        <listitem>
    4545          <para>This tells <command>configure</command> to search in
    46           <filename class="directory">/cross-tools</filename> for libraries.</para>
     46          <filename class="directory">${CLFS}/cross-tools</filename> for libraries.</para>
    4747        </listitem>
    4848      </varlistentry>
    4949
    5050      <varlistentry>
    51         <term><parameter>--with-gmp=/cross-tools</parameter></term>
     51        <term><parameter>--with-gmp=${CLFS}/cross-tools</parameter></term>
    5252        <listitem>
    5353          <para>This tells <command>configure</command> where to find GMP.</para>
    5454        </listitem>
  • BOOK/cross-tools/common/ncurses.xml

    diff --git a/BOOK/cross-tools/common/ncurses.xml b/BOOK/cross-tools/common/ncurses.xml
    index 048979f..e63d0fc 100644
    a b  
    3232
    3333    <para os="a">Prepare Ncurses for compilation:</para>
    3434
    35 <screen os="b"><userinput>./configure --prefix=/cross-tools \
     35<screen os="b"><userinput>./configure --prefix=${CLFS}/cross-tools \
    3636    --without-debug --without-shared</userinput></screen>
    3737
    3838    <variablelist os="b1">
    make -C progs tic</userinput></screen>  
    6363
    6464    <para os="e">Install <command>tic</command> with the following command:</para>
    6565
    66 <screen os="f"><userinput>install -v -m755 progs/tic /cross-tools/bin</userinput></screen>
     66<screen os="f"><userinput>install -v -m755 progs/tic ${CLFS}/cross-tools/bin</userinput></screen>
    6767
    6868  </sect2>
    6969
  • BOOK/cross-tools/mips/linux-headers.xml

    diff --git a/BOOK/cross-tools/mips/linux-headers.xml b/BOOK/cross-tools/mips/linux-headers.xml
    index 1f93d99..bb4e4fb 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=mips headers_check
    35 make ARCH=mips INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=mips INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=mips INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=mips INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=mips INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/cross-tools/mips64-64/gcc-final.xml

    diff --git a/BOOK/cross-tools/mips64-64/gcc-final.xml b/BOOK/cross-tools/mips64-64/gcc-final.xml
    index a32a8a7..953a3a7 100644
    a b  
    5858    href="gcc-static.xml"
    5959    xpointer="xpointer(//*[@os='h'])"/>
    6060
    61 <screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    62     ../gcc-4.8.2/configure --prefix=/cross-tools \
     61<screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     62    ../gcc-4.8.2/configure --prefix=${CLFS}/cross-tools \
    6363    --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
    6464    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    6565    --with-native-system-header-dir=/tools/include --disable-nls \
    6666    --enable-shared --disable-static --enable-languages=c,c++ \
    6767    --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix \
    68     --disable-multilib --with-mpc=/cross-tools --with-mpfr=/cross-tools \
    69     --with-gmp=/cross-tools --with-cloog=/cross-tools \
    70     --with-isl=/cross-tools --with-system-zlib --enable-checking=release \
     68    --disable-multilib --with-mpc=${CLFS}/cross-tools --with-mpfr=${CLFS}/cross-tools \
     69    --with-gmp=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools \
     70    --with-isl=${CLFS}/cross-tools --with-system-zlib --enable-checking=release \
    7171    --enable-libstdcxx-time --with-abi=64</userinput></screen>
    7272
    7373    <variablelist os="bg">
  • BOOK/cross-tools/mips64-64/gcc-static.xml

    diff --git a/BOOK/cross-tools/mips64-64/gcc-static.xml b/BOOK/cross-tools/mips64-64/gcc-static.xml
    index b49cab0..177b9fc 100644
    a b  
    6767    href="../../final-system/common/gcc.xml"
    6868    xpointer="xpointer(//*[@os='h'])"/>
    6969
    70 <screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    71     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     70<screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     71    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
    7272    --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    7373    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    7474    --with-native-system-header-dir=/tools/include --disable-nls \
    75     --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools \
    76     --with-isl=/cross-tools --with-cloog=/cross-tools --with-mpc=/cross-tools \
     75    --disable-shared --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
     76    --with-isl=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools --with-mpc=${CLFS}/cross-tools \
    7777    --without-headers --with-newlib --disable-decimal-float --disable-libgomp \
    7878    --disable-libmudflap --disable-libssp --disable-libatomic --disable-libitm \
    7979    --disable-libsanitizer --disable-libquadmath --disable-threads \
  • BOOK/cross-tools/mips64/glibc-n32.xml

    diff --git a/BOOK/cross-tools/mips64/glibc-n32.xml b/BOOK/cross-tools/mips64/glibc-n32.xml
    index 907a244..6d384fd 100644
    a b  
    6464    ../glibc-&glibc-version;/configure --prefix=/tools \
    6565    --host=${CLFS_TARGET} --build=${CLFS_HOST} --libdir=/tools/lib32 \
    6666    --disable-profile --with-tls --enable-kernel=2.6.32 --with-__thread \
    67     --with-binutils=/cross-tools/bin --with-headers=/tools/include \
     67    --with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/tools/include \
    6868    --enable-obsolete-rpc --cache-file=config.cache</userinput></screen>
    6969
    7070    <variablelist os="fa">
  • BOOK/cross-tools/multilib/binutils.xml

    diff --git a/BOOK/cross-tools/multilib/binutils.xml b/BOOK/cross-tools/multilib/binutils.xml
    index 9a0fdf4..999508d 100644
    a b  
    4848    xpointer="xpointer(//*[@os='i'])"/>
    4949
    5050<screen os="bc"><userinput>AR=ar AS=as ../binutils-&binutils-dir;/configure \
    51     --prefix=/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
     51    --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    5252    --with-sysroot=${CLFS} --with-lib-path=/tools/lib:/tools/lib64 \
    5353    --disable-nls --disable-static --enable-64-bit-bfd</userinput></screen>
    5454
  • BOOK/cross-tools/multilib/gcc-final.xml

    diff --git a/BOOK/cross-tools/multilib/gcc-final.xml b/BOOK/cross-tools/multilib/gcc-final.xml
    index a562784..3920683 100644
    a b  
    5858    href="gcc-static.xml"
    5959    xpointer="xpointer(//*[@os='h'])"/>
    6060
    61 <screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    62     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     61<screen os="bf"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     62    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
    6363    --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
    6464    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    6565    --with-native-system-header-dir=/tools/include \
    6666    --disable-nls --enable-shared --disable-static \
    6767    --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 \
    68     --enable-long-long --enable-threads=posix --with-mpc=/cross-tools \
    69     --with-mpfr=/cross-tools --with-gmp=/cross-tools --with-cloog=/cross-tools \
    70     --with-isl=/cross-tools --with-system-zlib --enable-checking=release \
     68    --enable-long-long --enable-threads=posix --with-mpc=${CLFS}/cross-tools \
     69    --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools --with-cloog=${CLFS}/cross-tools \
     70    --with-isl=${CLFS}/cross-tools --with-system-zlib --enable-checking=release \
    7171    --enable-libstdcxx-time</userinput></screen>
    7272
    7373    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  • BOOK/cross-tools/multilib/gcc-static.xml

    diff --git a/BOOK/cross-tools/multilib/gcc-static.xml b/BOOK/cross-tools/multilib/gcc-static.xml
    index 7eb7b7d..8583417 100644
    a b  
    6767    href="../../final-system/common/gcc.xml"
    6868    xpointer="xpointer(//*[@os='h'])"/>
    6969
    70 <screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
    71     ../gcc-&gcc-version;/configure --prefix=/cross-tools \
     70<screen os="al"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
     71    ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
    7272    --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
    7373    --with-sysroot=${CLFS} --with-local-prefix=/tools \
    7474    --with-native-system-header-dir=/tools/include --disable-nls \
    75     --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools \
    76     --with-cloog=/cross-tools --with-mpc=/cross-tools --without-headers \
     75    --disable-shared --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
     76    --with-cloog=${CLFS}/cross-tools --with-mpc=${CLFS}/cross-tools --without-headers \
    7777    --with-newlib --disable-decimal-float --disable-libgomp --disable-libmudflap \
    7878    --disable-libssp --disable-libatomic --disable-libitm \
    7979    --disable-libsanitizer --disable-libquadmath --disable-threads \
    80     --disable-target-zlib --with-system-zlib --with-isl=/cross-tools \
     80    --disable-target-zlib --with-system-zlib --with-isl=${CLFS}/cross-tools \
    8181    --enable-languages=c --enable-checking=release</userinput></screen>
    8282
    8383    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  • BOOK/cross-tools/multilib/glibc-64bit.xml

    diff --git a/BOOK/cross-tools/multilib/glibc-64bit.xml b/BOOK/cross-tools/multilib/glibc-64bit.xml
    index 6029db8..a9e2378 100644
    a b  
    6464    ../glibc-&glibc-version;/configure --prefix=/tools \
    6565    --host=${CLFS_TARGET} --build=${CLFS_HOST} --libdir=/tools/lib64 \
    6666    --disable-profile --with-tls --enable-kernel=2.6.32 --with-__thread \
    67     --with-binutils=/cross-tools/bin --with-headers=/tools/include \
     67    --with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/tools/include \
    6868    --enable-obsolete-rpc --cache-file=config.cache</userinput></screen>
    6969
    7070    <variablelist os="dg">
  • BOOK/cross-tools/multilib/glibc.xml

    diff --git a/BOOK/cross-tools/multilib/glibc.xml b/BOOK/cross-tools/multilib/glibc.xml
    index d67fbc1..74ef9fa 100644
    a b  
    5959    ../glibc-&glibc-version;/configure --prefix=/tools \
    6060    --host=${CLFS_TARGET32} --build=${CLFS_HOST} \
    6161    --disable-profile --with-tls --enable-kernel=2.6.32 --with-__thread \
    62     --with-binutils=/cross-tools/bin --with-headers=/tools/include \
     62    --with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/tools/include \
    6363    --enable-obsolete-rpc --cache-file=config.cache</userinput></screen>
    6464
    6565    <variablelist os="dg">
  • BOOK/cross-tools/ppc/linux-headers.xml

    diff --git a/BOOK/cross-tools/ppc/linux-headers.xml b/BOOK/cross-tools/ppc/linux-headers.xml
    index 849482d..6251a4f 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=powerpc headers_check
    35 make ARCH=powerpc INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=powerpc INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=powerpc INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=powerpc INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=powerpc INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/cross-tools/sparc/linux-headers.xml

    diff --git a/BOOK/cross-tools/sparc/linux-headers.xml b/BOOK/cross-tools/sparc/linux-headers.xml
    index 23ad793..6febf76 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=sparc headers_check
    35 make ARCH=sparc INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=sparc INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=sparc INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=sparc INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=sparc INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/cross-tools/sparc64/linux-headers.xml

    diff --git a/BOOK/cross-tools/sparc64/linux-headers.xml b/BOOK/cross-tools/sparc64/linux-headers.xml
    index a61757f..d9b6bab 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=sparc64 headers_check
    35 make ARCH=sparc64 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=sparc64 INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=sparc64 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=sparc64 INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=sparc64 INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/cross-tools/x86/linux-headers.xml

    diff --git a/BOOK/cross-tools/x86/linux-headers.xml b/BOOK/cross-tools/x86/linux-headers.xml
    index 7db269a..e928736 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=i386 headers_check
    35 make ARCH=i386 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=i386 INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=i386 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=i386 INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=i386 INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/cross-tools/x86_64/linux-headers.xml

    diff --git a/BOOK/cross-tools/x86_64/linux-headers.xml b/BOOK/cross-tools/x86_64/linux-headers.xml
    index 7253dd0..71fdb49 100644
    a b  
    3232
    3333<screen os="c"><userinput>make mrproper
    3434make ARCH=x86_64 headers_check
    35 make ARCH=x86_64 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>
     35make ARCH=x86_64 INSTALL_HDR_PATH=${CLFS}/tools headers_install</userinput></screen>
    3636
    3737    <variablelist os="d">
    3838      <title>The meaning of the make commands:</title>
    make ARCH=x86_64 INSTALL_HDR_PATH=/tools headers_install</userinput></screen>  
    5050      </varlistentry>
    5151
    5252      <varlistentry os="d3">
    53         <term><parameter>make ARCH=x86_64 INSTALL_HDR_PATH=/tools headers_install</parameter></term>
     53        <term><parameter>make ARCH=x86_64 INSTALL_HDR_PATH=${CLFS}/tools headers_install</parameter></term>
    5454        <listitem>
    5555          <para>This will install the kernel headers into
    56           <filename class="directory">/tools/include</filename>.</para>
     56          <filename class="directory">${CLFS}/tools/include</filename>.</para>
    5757        </listitem>
    5858      </varlistentry>
    5959
  • BOOK/final-preps/creatingcrossdir.xml

    diff --git a/BOOK/final-preps/creatingcrossdir.xml b/BOOK/final-preps/creatingcrossdir.xml
    index f0fdc2a..dcb638f 100644
    a b  
    2323
    2424<screen><userinput>install -dv ${CLFS}/cross-tools</userinput></screen>
    2525
    26   <para>The next step is to create a <filename
    27   class="symlink">/cross-tools</filename> symlink on the host system.
    28   This will point to the newly-created directory on the CLFS partition.
    29   Run this command as  <systemitem class="username">root</systemitem> as well:</para>
    30 
    31 <screen><userinput>ln -sv ${CLFS}/cross-tools /</userinput></screen>
    32 
    3326</sect1>
  • BOOK/final-preps/creatingtoolsdir.xml

    diff --git a/BOOK/final-preps/creatingtoolsdir.xml b/BOOK/final-preps/creatingtoolsdir.xml
    index ec27f39..1c93d50 100644
    a b  
    2525
    2626<screen><userinput>install -dv ${CLFS}/tools</userinput></screen>
    2727
    28   <para>The next step is to create a <filename class="symlink">/tools</filename>
    29   symlink on the host system. This will point to the newly-created directory
    30   on the CLFS partition. Run this command as <systemitem
    31   class="username">root</systemitem> as well:</para>
    32 
    33 <screen><userinput>ln -sv ${CLFS}/tools /</userinput></screen>
    34 
    3528  <note>
    3629    <para>The above command is correct. The <command>ln</command> command
    3730    has a few syntactic variations, so be sure to check <command>info
     
    3932    what you may think is an error.</para>
    4033  </note>
    4134
    42   <para>The created symlink enables the toolchain to be compiled so that
    43   it always refers to <filename class="directory">/tools</filename>,
    44   meaning that the compiler, assembler, and linker will work. This will
    45   provide a common place for our temporary tools system.</para>
    46 
    4735</sect1>
  • BOOK/final-preps/settingenviron.xml

    diff --git a/BOOK/final-preps/settingenviron.xml b/BOOK/final-preps/settingenviron.xml
    index 0b82f75..3ae42b5 100644
    a b EOF</userinput></screen>  
    4343umask 022
    4444CLFS=/mnt/clfs
    4545LC_ALL=POSIX
    46 PATH=/cross-tools/bin:/bin:/usr/bin
     46PATH=${CLFS}/cross-tools/bin:/bin:/usr/bin
    4747export CLFS LC_ALL PATH</literal>
    4848EOF</userinput></screen>
    4949
    EOF</userinput></screen>  
    5555  be used as soon as they are installed. By switching off the hash function,
    5656  the shell will always search the <envar>PATH</envar> when a program is to
    5757  be run. As such, the shell will find the newly compiled tools in
    58   <filename class="directory">/cross-tools</filename> as soon as they are
     58  <filename class="directory">${CLFS}/cross-tools</filename> as soon as they are
    5959  available without remembering a previous version of the same program in a
    6060  different location.</para>
    6161
    EOF</userinput></screen>  
    7878  (the two are equivalent) ensures that everything will work as expected in
    7979  the chroot environment.</para>
    8080
    81   <para os="j">By putting <filename class="directory">/cross-tools/bin</filename>
     81  <para os="j">By putting <filename class="directory">${CLFS}/cross-tools/bin</filename>
    8282  at the beginning of the <envar>PATH</envar>, the cross-compiler
    8383  built in <xref linkend="chapter-cross-tools"/> will be picked up by
    8484  the build process for the temp-system packages before anything that
  • BOOK/temp-system/64/gcc.xml

    diff --git a/BOOK/temp-system/64/gcc.xml b/BOOK/temp-system/64/gcc.xml
    index fc71f1a..3905956 100644
    a b  
    7676    --with-local-prefix=/tools --enable-long-long --enable-c99 --enable-shared \
    7777    --enable-threads=posix --disable-nls --enable-__cxa_atexit \
    7878    --enable-languages=c,c++ --disable-libstdcxx-pch --with-system-zlib \
    79     --with-native-system-header-dir=/tools/include --enable-checking=release \
     79    --with-native-system-header-dir=${CLFS}/tools/include --enable-checking=release \
    8080    --enable-libstdcxx-time</userinput></screen>
    8181
    8282    <variablelist>
  • BOOK/temp-system/64/mpc.xml

    diff --git a/BOOK/temp-system/64/mpc.xml b/BOOK/temp-system/64/mpc.xml
    index 8b93910..17d10af 100644
    a b  
    2727    xpointer="xpointer(//*[@os='a'])"/>
    2828
    2929<screen os="b"><userinput>CC="${CC} ${BUILD64}" \
    30   ./configure --prefix=/tools \
     30  ./configure --prefix=/tools --with-sysroot \
    3131    --build=${CLFS_HOST} --host=${CLFS_TARGET}</userinput></screen>
    3232
    3333    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  • BOOK/temp-system/64/mpfr.xml

    diff --git a/BOOK/temp-system/64/mpfr.xml b/BOOK/temp-system/64/mpfr.xml
    index 30af93c..4b6cddc 100644
    a b  
    3636
    3737<screen os="b"><userinput>CC="${CC} ${BUILD64}" ./configure --prefix=/tools \
    3838    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    39     --enable-shared</userinput></screen>
     39    --enable-shared --with-sysroot</userinput></screen>
    4040
    4141    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    4242    href="../common/mpfr.xml"
  • BOOK/temp-system/64/util-linux.xml

    diff --git a/BOOK/temp-system/64/util-linux.xml b/BOOK/temp-system/64/util-linux.xml
    index 7edeb89..4e6a22f 100644
    a b  
    2424
    2525    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    2626    href="../common/util-linux.xml"
     27    xpointer="xpointer(//*[@os='s1'])"/>
     28
     29    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     30    href="../common/util-linux.xml"
     31    xpointer="xpointer(//*[@os='s2'])"/>
     32
     33    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     34    href="../common/util-linux.xml"
    2735    xpointer="xpointer(//*[@os='a'])"/>
    2836
    2937<screen os="be"><userinput>CC="${CC} ${BUILD64}" PKG_CONFIG= ./configure --prefix=/tools \
  • BOOK/temp-system/common/bash.xml

    diff --git a/BOOK/temp-system/common/bash.xml b/BOOK/temp-system/common/bash.xml
    index 5fa0642..2fdb458 100644
    a b EOF</userinput></screen>  
    8888    href="../../final-system/common/bash.xml"
    8989    xpointer="xpointer(//*[@os='g'])"/>
    9090
    91 <screen os="h"><userinput>make install</userinput></screen>
     91<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    9292
    9393  </sect2>
    9494
  • BOOK/temp-system/common/binutils.xml

    diff --git a/BOOK/temp-system/common/binutils.xml b/BOOK/temp-system/common/binutils.xml
    index ec1dd0f..eafdb95 100644
    a b  
    6161    href="../../cross-tools/common/binutils.xml"
    6262    xpointer="xpointer(//*[@os='bh'])"/>
    6363
    64     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    65     href="../../cross-tools/common/binutils.xml"
    66     xpointer="xpointer(//*[@os='bi'])"/>
     64<screen os="bi"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6765
    6866  </sect2>
    6967
  • BOOK/temp-system/common/bzip2.xml

    diff --git a/BOOK/temp-system/common/bzip2.xml b/BOOK/temp-system/common/bzip2.xml
    index bdd49a8..d5fc790 100644
    a b sed -e 's@^\(all:.*\) test@\1@g' Makefile.orig &gt; Makefile</userinput></screen  
    3737
    3838    <para os="cd">Install the package:</para>
    3939
    40 <screen os="ce"><userinput>make PREFIX=/tools install</userinput></screen>
     40<screen os="ce"><userinput>make PREFIX=${CLFS}/tools install</userinput></screen>
    4141
    4242  </sect2>
    4343
  • BOOK/temp-system/common/check.xml

    diff --git a/BOOK/temp-system/common/check.xml b/BOOK/temp-system/common/check.xml
    index ef36a19..5ece3d5 100644
    a b  
    4949
    5050    <para os="i">Install the package:</para>
    5151
    52 <screen os="j"><userinput>make install</userinput></screen>
     52<screen os="j"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    5353
    5454  </sect2>
    5555
  • BOOK/temp-system/common/cloog.xml

    diff --git a/BOOK/temp-system/common/cloog.xml b/BOOK/temp-system/common/cloog.xml
    index d266518..74a9cde 100644
    a b  
    4141
    4242    <para os="e">Install the package:</para>
    4343
    44 <screen os="f"><userinput>make install</userinput></screen>
     44<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4545
    4646  </sect2>
    4747
  • BOOK/temp-system/common/coreutils.xml

    diff --git a/BOOK/temp-system/common/coreutils.xml b/BOOK/temp-system/common/coreutils.xml
    index 5b29524..53f109c 100644
    a b EOF</userinput></screen>  
    6161
    6262    <para os="bh">Install the package:</para>
    6363
    64 <screen os="bi"><userinput>make install</userinput></screen>
     64<screen os="bi"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6565
    6666  </sect2>
    6767
  • BOOK/temp-system/common/diffutils.xml

    diff --git a/BOOK/temp-system/common/diffutils.xml b/BOOK/temp-system/common/diffutils.xml
    index 0fdafee..f72223b 100644
    a b  
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/file.xml

    diff --git a/BOOK/temp-system/common/file.xml b/BOOK/temp-system/common/file.xml
    index fbe6d70..b1b1fab 100644
    a b  
    3333
    3434    <para os="f">Install the package:</para>
    3535
    36 <screen os="g"><userinput>make install</userinput></screen>
     36<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/findutils.xml

    diff --git a/BOOK/temp-system/common/findutils.xml b/BOOK/temp-system/common/findutils.xml
    index 24969b5..e3d82b6 100644
    a b echo "ac_cv_func_fnmatch_gnu=yes" &gt;&gt; config.cache</userinput></screen>  
    4848    href="../../final-system/common/findutils.xml"
    4949    xpointer="xpointer(//*[@os='g'])"/>
    5050
    51     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    52     href="../../final-system/common/findutils.xml"
    53     xpointer="xpointer(//*[@os='h'])"/>
     51<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    5452
    5553  </sect2>
    5654
  • BOOK/temp-system/common/gawk.xml

    diff --git a/BOOK/temp-system/common/gawk.xml b/BOOK/temp-system/common/gawk.xml
    index 9a62dfe..e15297a 100644
    a b  
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/gcc.xml

    diff --git a/BOOK/temp-system/common/gcc.xml b/BOOK/temp-system/common/gcc.xml
    index 6e02cab..1ba2540 100644
    a b  
    7474    --with-local-prefix=/tools --enable-long-long --enable-c99 --enable-shared \
    7575    --enable-threads=posix --disable-multilib --disable-nls \
    7676    --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch \
    77     --with-system-zlib --with-native-system-header-dir=/tools/include \
     77    --with-system-zlib --with-native-system-header-dir=${CLFS}/tools/include \
    7878    --disable-libssp --enable-checking=release --enable-libstdcxx-time</userinput></screen>
    7979
    8080    <variablelist os="cl">
    sed "/^HOST_\(GMP\|ISL\|CLOOG\)\(LIBS\|INC\)/s:/tools:/cross-tools:g" \  
    105105
    106106    <para os="co">Install the package:</para>
    107107
    108 <screen os="cp"><userinput>make install</userinput></screen>
     108<screen os="cp"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    109109
    110110  </sect2>
    111111
  • BOOK/temp-system/common/gettext.xml

    diff --git a/BOOK/temp-system/common/gettext.xml b/BOOK/temp-system/common/gettext.xml
    index 22f876e..6c7d8bb 100644
    a b make -C src msgfmt msgmerge xgettext</userinput></screen>  
    4949    <para os="g">Install the <command>msgfmt</command>,
    5050    <command>msgmerge</command> and <command>xgettext</command> binaries:</para>
    5151
    52 <screen os="h"><userinput>cp -v src/{msgfmt,msgmerge,xgettext} /tools/bin</userinput></screen>
     52<screen os="h"><userinput>cp -v src/{msgfmt,msgmerge,xgettext} ${CLFS}/tools/bin</userinput></screen>
    5353
    5454  </sect2>
    5555
  • BOOK/temp-system/common/gmp.xml

    diff --git a/BOOK/temp-system/common/gmp.xml b/BOOK/temp-system/common/gmp.xml
    index fea731b..dcd8eae 100644
    a b  
    4444
    4545    <para os="e">Install the package:</para>
    4646
    47 <screen os="f"><userinput>make install</userinput></screen>
     47<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4848
    4949  </sect2>
    5050
  • BOOK/temp-system/common/grep.xml

    diff --git a/BOOK/temp-system/common/grep.xml b/BOOK/temp-system/common/grep.xml
    index f5918c3..4757a71 100644
    a b  
    5757    href="../../final-system/common/grep.xml"
    5858    xpointer="xpointer(//*[@os='f'])"/>
    5959
    60     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    61     href="../../final-system/common/grep.xml"
    62     xpointer="xpointer(//*[@os='g'])"/>
     60<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6361
    6462  </sect2>
    6563
  • BOOK/temp-system/common/gzip.xml

    diff --git a/BOOK/temp-system/common/gzip.xml b/BOOK/temp-system/common/gzip.xml
    index cc8e846..03e9cc6 100644
    a b  
    4141    href="../../final-system/common/gzip.xml"
    4242    xpointer="xpointer(//*[@os='f'])"/>
    4343
    44     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    45     href="../../final-system/common/gzip.xml"
    46     xpointer="xpointer(//*[@os='g'])"/>
     44<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4745
    4846  </sect2>
    4947
  • BOOK/temp-system/common/isl.xml

    diff --git a/BOOK/temp-system/common/isl.xml b/BOOK/temp-system/common/isl.xml
    index 7d1c2de..00b3365 100644
    a b  
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/m4.xml

    diff --git a/BOOK/temp-system/common/m4.xml b/BOOK/temp-system/common/m4.xml
    index 67a87b6..3928e08 100644
    a b EOF</userinput></screen>  
    4949
    5050    <para os="e">Install the package:</para>
    5151
    52 <screen os="f"><userinput>make install</userinput></screen>
     52<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    5353
    5454  </sect2>
    5555
  • BOOK/temp-system/common/make.xml

    diff --git a/BOOK/temp-system/common/make.xml b/BOOK/temp-system/common/make.xml
    index 3a71d35..a07df5e 100644
    a b  
    4141    href="../../final-system/common/make.xml"
    4242    xpointer="xpointer(//*[@os='f'])"/>
    4343
    44     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    45     href="../../final-system/common/make.xml"
    46     xpointer="xpointer(//*[@os='g'])"/>
     44<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4745
    4846  </sect2>
    4947
  • BOOK/temp-system/common/mpc.xml

    diff --git a/BOOK/temp-system/common/mpc.xml b/BOOK/temp-system/common/mpc.xml
    index 41c3c1d..9b86139 100644
    a b  
    2424
    2525    <para os="a">Prepare MPC for compilation:</para>
    2626
    27 <screen os="b"><userinput>./configure --prefix=/tools \
     27<screen os="b"><userinput>./configure --prefix=/tools --with-sysroot \
    2828    --build=${CLFS_HOST} --host=${CLFS_TARGET}</userinput></screen>
    2929
    3030    <para os="c">Compile the package:</para>
     
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/mpfr.xml

    diff --git a/BOOK/temp-system/common/mpfr.xml b/BOOK/temp-system/common/mpfr.xml
    index 2c6ea76..983a385 100644
    a b  
    3434
    3535<screen os="b"><userinput>./configure --prefix=/tools \
    3636    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    37     --enable-shared</userinput></screen>
     37    --enable-shared --with-sysroot</userinput></screen>
    3838
    3939    <para os="c">Compile the package:</para>
    4040
     
    4242
    4343    <para os="e">Install the package:</para>
    4444
    45 <screen os="f"><userinput>make install</userinput></screen>
     45<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4646
    4747  </sect2>
    4848
  • BOOK/temp-system/common/ncurses.xml

    diff --git a/BOOK/temp-system/common/ncurses.xml b/BOOK/temp-system/common/ncurses.xml
    index 70543a7..1f13e2e 100644
    a b  
    9494    href="../../final-system/common/ncurses.xml"
    9595    xpointer="xpointer(//*[@os='f'])"/>
    9696
    97     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    98     href="../../final-system/common/ncurses.xml"
    99     xpointer="xpointer(//*[@os='g'])"/>
     97<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    10098
    10199  </sect2>
    102100
  • BOOK/temp-system/common/patch.xml

    diff --git a/BOOK/temp-system/common/patch.xml b/BOOK/temp-system/common/patch.xml
    index d2c2674..51e9699 100644
    a b  
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/sed.xml

    diff --git a/BOOK/temp-system/common/sed.xml b/BOOK/temp-system/common/sed.xml
    index 607b0a6..2ed446a 100644
    a b  
    3333
    3434    <para os="e">Install the package:</para>
    3535
    36 <screen os="f"><userinput>make install</userinput></screen>
     36<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    3737
    3838  </sect2>
    3939
  • BOOK/temp-system/common/tar.xml

    diff --git a/BOOK/temp-system/common/tar.xml b/BOOK/temp-system/common/tar.xml
    index da72632..e5488cd 100644
    a b EOF</userinput></screen>  
    5757    href="../../final-system/common/tar.xml"
    5858    xpointer="xpointer(//*[@os='f'])"/>
    5959
    60     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    61     href="../../final-system/common/tar.xml"
    62     xpointer="xpointer(//*[@os='g'])"/>
     60<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6361
    6462  </sect2>
    6563
  • BOOK/temp-system/common/texinfo.xml

    diff --git a/BOOK/temp-system/common/texinfo.xml b/BOOK/temp-system/common/texinfo.xml
    index b4a62e3..be8adaf 100644
    a b  
    5454    href="../../final-system/common/texinfo.xml"
    5555    xpointer="xpointer(//*[@os='f'])"/>
    5656
    57     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    58     href="../../final-system/common/texinfo.xml"
    59     xpointer="xpointer(//*[@os='g'])"/>
     57<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    6058
    6159  </sect2>
    6260
  • BOOK/temp-system/common/util-linux.xml

    diff --git a/BOOK/temp-system/common/util-linux.xml b/BOOK/temp-system/common/util-linux.xml
    index 6e6f78b..7e8e999 100644
    a b  
    2222  <sect2 role="installation">
    2323    <title>Installation of Util-linux</title>
    2424
     25    <para os="s1">Allow librt to find libpthread:</para>
     26
     27<screen os="s2"><userinput>cp -v Makefile.in{,.orig}
     28sed 's/-lrt/&amp; -lpthread/' Makefile.in.orig > Makefile.in</userinput></screen>
     29
    2530    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    2631    href="../../final-system/common/util-linux.xml"
    2732    xpointer="xpointer(//*[@os='a'])"/>
     
    5358    href="../../final-system/common/util-linux.xml"
    5459    xpointer="xpointer(//*[@os='g'])"/>
    5560
    56 <screen os="h"><userinput>make install</userinput></screen>
     61<screen os="h"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    5762
    5863  </sect2>
    5964
  • BOOK/temp-system/common/vim.xml

    diff --git a/BOOK/temp-system/common/vim.xml b/BOOK/temp-system/common/vim.xml
    index 72460c3..1dee497 100644
    a b EOF</userinput></screen>  
    106106    href="../../final-system/common/vim.xml"
    107107    xpointer="xpointer(//*[@os='j'])"/>
    108108
    109 <screen os="k"><userinput>make install</userinput></screen>
     109<screen os="k"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    110110
    111111    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    112112    href="../../final-system/common/vim.xml"
    113113    xpointer="xpointer(//*[@os='l'])"/>
    114114
    115 <screen os="m"><userinput>ln -sv vim /tools/bin/vi</userinput></screen>
     115<screen os="m"><userinput>ln -sv vim ${CLFS}/tools/bin/vi</userinput></screen>
    116116
    117117    <para os="tv1" >Create a temporary vimrc to make it function more the way you may
    118118    expect it to. This is explained more in the final system:</para>
    119119
    120 <screen os="tv2"><userinput>cat &gt; /tools/etc/vimrc &lt;&lt; "EOF"
     120<screen os="tv2"><userinput>cat &gt; ${CLFS}/tools/etc/vimrc &lt;&lt; "EOF"
    121121<literal>" Begin /tools/etc/vimrc
    122122
    123123set nocompatible
  • BOOK/temp-system/common/xz.xml

    diff --git a/BOOK/temp-system/common/xz.xml b/BOOK/temp-system/common/xz.xml
    index 3fd8564..24baaed 100644
    a b  
    3939
    4040    <para os="ce">Install the package:</para>
    4141
    42 <screen os="cf"><userinput>make install</userinput></screen>
     42<screen os="cf"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4343
    4444  </sect2>
    4545
  • BOOK/temp-system/common/zlib.xml

    diff --git a/BOOK/temp-system/common/zlib.xml b/BOOK/temp-system/common/zlib.xml
    index dc6224a..14e9316 100644
    a b  
    4040    href="../../final-system/common/zlib.xml"
    4141    xpointer="xpointer(//*[@os='f'])"/>
    4242
    43 <screen os="g"><userinput>make install</userinput></screen>
     43<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
    4444
    4545  </sect2>
    4646
  • BOOK/temp-system/mips64-64/gcc.xml

    diff --git a/BOOK/temp-system/mips64-64/gcc.xml b/BOOK/temp-system/mips64-64/gcc.xml
    index 89ba7e6..4e258b6 100644
    a b  
    7777    --enable-shared --enable-threads=posix --disable-nls --enable-__cxa_atexit \
    7878    --enable-languages=c,c++ --disable-libstdcxx-pch --with-system-zlib \
    7979    --enable-checking=release --enable-libstdcxx-time \
    80     --with-native-system-header-dir=/tools/include</userinput></screen>
     80    --with-native-system-header-dir=${CLFS}/tools/include</userinput></screen>
    8181
    8282    <variablelist>
    8383      <title>The meaning of the new configure options:</title>
  • BOOK/temp-system/mips64/gcc.xml

    diff --git a/BOOK/temp-system/mips64/gcc.xml b/BOOK/temp-system/mips64/gcc.xml
    index d1192ad..995b202 100644
    a b  
    7878    --enable-__cxa_atexit --disable-nls --enable-languages=c,c++ \
    7979    --disable-libstdcxx-pch --with-abi=64 --with-system-zlib \
    8080    --enable-checking=release --enable-libstdcxx-time \
    81     --with-native-system-header-dir=/tools/include</userinput></screen>
     81    --with-native-system-header-dir=${CLFS}/tools/include</userinput></screen>
    8282
    8383    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    8484    href="../multilib/gcc.xml"
  • BOOK/temp-system/multilib/gcc.xml

    diff --git a/BOOK/temp-system/multilib/gcc.xml b/BOOK/temp-system/multilib/gcc.xml
    index c54a610..dadabca 100644
    a b  
    7676    --target=${CLFS_TARGET} --with-local-prefix=/tools --enable-long-long \
    7777    --enable-c99 --enable-shared --enable-threads=posix --disable-nls \
    7878    --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch \
    79     --with-system-zlib --with-native-system-header-dir=/tools/include \
     79    --with-system-zlib --with-native-system-header-dir=${CLFS}/tools/include \
    8080    --disable-libssp --enable-libstdcxx-time --enable-checking=release</userinput></screen>
    8181
    8282    <variablelist os="dd">
  • BOOK/temp-system/multilib/make.xml

    diff --git a/BOOK/temp-system/multilib/make.xml b/BOOK/temp-system/multilib/make.xml
    index 7aff7ce..9e5be6e 100644
    a b  
    4242    xpointer="xpointer(//*[@os='f'])"/>
    4343
    4444    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    45     href="../../final-system/common/make.xml"
     45    href="../common/make.xml"
    4646    xpointer="xpointer(//*[@os='g'])"/>
    4747
    4848  </sect2>
  • BOOK/temp-system/multilib/mpc.xml

    diff --git a/BOOK/temp-system/multilib/mpc.xml b/BOOK/temp-system/multilib/mpc.xml
    index e874455..c51a2d8 100644
    a b  
    2727    xpointer="xpointer(//*[@os='a'])"/>
    2828
    2929<screen os="b"><userinput>CC="${CC} ${BUILD64}" \
    30   ./configure --prefix=/tools \
     30  ./configure --prefix=/tools --with-sysroot \
    3131    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    3232    --libdir=/tools/lib64</userinput></screen>
    3333
  • BOOK/temp-system/multilib/mpfr.xml

    diff --git a/BOOK/temp-system/multilib/mpfr.xml b/BOOK/temp-system/multilib/mpfr.xml
    index 773469e..7a2da19 100644
    a b  
    3636
    3737<screen os="b"><userinput>CC="${CC} ${BUILD64}" ./configure --prefix=/tools \
    3838    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    39     --libdir=/tools/lib64 --enable-shared</userinput></screen>
     39    --libdir=/tools/lib64 --enable-shared --with-sysroot</userinput></screen>
    4040
    4141    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    4242    href="../common/mpfr.xml"
  • BOOK/temp-system/multilib/util-linux.xml

    diff --git a/BOOK/temp-system/multilib/util-linux.xml b/BOOK/temp-system/multilib/util-linux.xml
    index a983f0b..adfae10 100644
    a b  
    2424
    2525    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    2626    href="../common/util-linux.xml"
     27    xpointer="xpointer(//*[@os='s1'])"/>
     28
     29    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     30    href="../common/util-linux.xml"
     31    xpointer="xpointer(//*[@os='s2'])"/>
     32
     33    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     34    href="../common/util-linux.xml"
    2735    xpointer="xpointer(//*[@os='a'])"/>
    2836
    2937<screen os="be"><userinput>CC="${CC} ${BUILD64}" PKG_CONFIG= ./configure --prefix=/tools \
  • BOOK/temp-system/ppc64-64/gcc.xml

    diff --git a/BOOK/temp-system/ppc64-64/gcc.xml b/BOOK/temp-system/ppc64-64/gcc.xml
    index 4625400..61ca6c4 100644
    a b  
    7676    --with-local-prefix=/tools --enable-long-long --enable-c99 \
    7777    --enable-shared --enable-threads=posix --disable-nls --enable-__cxa_atexit \
    7878    --enable-languages=c,c++ --disable-libstdcxx-pch --with-system-zlib \
    79     --with-native-system-header-dir=/tools/include --enable-checking=release \
     79    --with-native-system-header-dir=${CLFS}/tools/include --enable-checking=release \
    8080    --enable-libstdcxx-time</userinput></screen>
    8181
    8282    <variablelist>