<?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-materials-creatingbuilddir">
  <?dbhtml filename="creatingbuilddir.html"?>

  <title>Creating Build and Sources Directories</title>

  <para> Create a directory for the CLFS build (the exact location is up to
    you): </para>

<screen><userinput>mkdir -p /mnt/clfs</userinput></screen>

  <para>Assign it to the <envar>CLFS</envar> environment variable:</para>

<screen><userinput>export CLFS=/mnt/clfs</userinput></screen>

  <para>Ensure that this new directory has permissions that are too restrictive
    such that you can write to it as a non-root user.</para>

<screen><userinput>chmod 777 ${CLFS}</userinput></screen>

  <para>Downloaded packages and patches will need to be stored somewhere
  that is conveniently available throughout the entire build. A working
  directory is also required to unpack the sources and build them.
  <filename class="directory">${CLFS}/sources</filename> can be used both
  as the place to store the tarballs and patches and as a working
  directory.</para>

  <para>Create a directory to store the sources:</para>

<screen><userinput>mkdir -v ${CLFS}/sources</userinput></screen>

</sect1>
