<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-final-preps-aboutclfs">
  <?dbhtml filename="aboutclfs.html"?>

  <title>Setting The ${CLFS} Variable</title>

  <para>Throughout this book, the environment variable <envar>CLFS</envar> will
  be used several times. You should ensure that this variable is always defined
  throughout the CLFS build process. It should be set to the name of the
  directory where you will be building your CLFS system - we will use
  <filename class="directory">/mnt/clfs</filename> as an example, but the
  directory choice is up to you. If you are building CLFS on a separate
  partition, this directory will be the mount point for the partition.
  Choose a directory location and set the variable with the
  following command:</para>

<screen><userinput>export CLFS=<replaceable>[/mnt/clfs]</replaceable></userinput></screen>

  <para>Having this variable set is beneficial in that commands such as
  <command>install -dv ${CLFS}/tools</command> can be typed literally. The shell
  will automatically replace <quote>${CLFS}</quote> with
  <quote>/mnt/clfs</quote> (or whatever the variable was set to) when it
  processes the command line.</para>

  <para>Do not forget to check that <envar>${CLFS}</envar> is set whenever
  you leave and reenter the current working environment (such as when doing a
  <command>su</command> to <systemitem class="username">root</systemitem> or
  another user). Check that the <envar>CLFS</envar> variable is set up
  properly with:</para>

<screen><userinput>echo ${CLFS}</userinput></screen>

  <para>Make sure the output shows the path to your CLFS system's build
  location, which is <filename class="directory">/mnt/clfs</filename> if the
  provided example was followed. If the output is incorrect, use the command
  given earlier on this  page to set <envar>${CLFS}</envar> to the correct
  directory name.</para>

</sect1>
