debian-cd-clone/wheezy-debian-edu/docs/makefile.html

145 lines
4.8 KiB
HTML

<html>
<head>
<title>The Makefile</title>
</head>
<body>
<h1>The Makefile</h1>
<p>A quick overview of the debian-cd Makefile: what it does, and
how.</p>
<h2>Variable setup and checking</h2>
<p>Simple sanity checking that all the needed variables from CONF.sh
are present and correct, and also set up some more internal
variables:</p>
<ul>
<li><code>BUILD_DATE</code> - simply, the date and time of the build
<li><code>ARCHES_NOSRC</code> - the list of arches specified, minus
source
<li><code>SOURCEONLY</code> - set only if we're building source and no
binaries
<li><code>INC_SOURCE</code> - set if we're building source at all
<li><em>lots of variables pointing to the helper scripts</em>
<li><code>BDIR</code> - the working dir for temporary files
<li><code>ADIR</code> - an alias for APTTMP, as set in CONF.sh
<li><code>DB_DIR</code> - points to a debootstrap temp dir under BDIR
<li><code>PATH</code> - we add the debootstrap /usr/sbin dir to the
path
<li><code>LATEST_DB</code> - the full path to the most recent version
of debootstrap in the archive
<h3><code>default:</code></h3>
<p>There is not a sensible default action for the Makefile (e.g. make
all), so simply print a message and return.</p>
<h3><code>ok:</code></h3>
<p>Simple sanity checking.</p>
<h3><code>$(MIRROR)/doc:</code>, <code>$(MIRROR)/tools:</code> and
<code>need-complete-mirror</code></h3>
<p>Ensure that we have all the needed pieces of the archive.</p>
<h2>General initialisation and cleanup</h2>
<h3><code>init:</code></h3>
<p>Depends on a group of trivial small rules - make the temp dirs as
necesssary, and extract the latest debootstrap deb from LATEST_DB
above.</p>
<h3><code>clean: and dir-clean:</code></h3>
<p>Clean up build tress.</p>
<h3><code>realclean: and distclean:</code></h3>
<p>Delete all temporary state.</p>
<h2>Package lists and apt setup</h2>
<h3><code>$(CODENAME)_status:</code></h3>
<p>Use the (maybe provided) default starting package list for
$(CODENAME). If that doesn't exist, fall back to "make status".</p>
<h3><code>status:</code> and <code>$(ADIR)/status:</code></h3>
<p>Create an initial list of the packages desired.</p>
<p>First, for BC and NETINST (aka INSTALLER_CD=1 or INSTALLER_CD=2),
simply create an empty list. For other CDs, grab the list of
Required/Important/Standard/Base packages from the Packages file.</p>
<p>Secondly, create/update the temporary apt db using
<code>apt-selection</code>.</p>
<p>Finally, use <code>apt-selection</code> to check the consistency of
the standard system in terms of dependencies. If needed, run
<code>make correctstatus</code> to add/remove packages.
<h3><code>correctstatus:</code></h3>
<p>Add/remove packages as needed to fix up the dependencies.</p>
<h3><code>apt-update:</code></h3>
<p>After setting up the default list of packages, run
<code>apt-selection update</code> for each of the arches, so we're
ready to ask apt to do real work for us.</p>
<h3><code>deletelist:</code></h3>
<p>Simple list cleanup</p>
<h3><code>packagelists:</code></h3>
<p>Helper for dependencies</p>
<h3><code>$(BDIR)/rawlist:</code></h3>
<p>Using debootstrap and the task file specified, generate a "raw"
(i.e. not cleanly formatted) list of the packages desired.</p>
<h3><code>genlist:</code>, <code>$(BDIR)/list</code>
<p>Clean up the rawlist files ready for use.</p>
<h2>Tree and image building</h2>
<h3><code>image-trees:</code></h3>
<p>Does a lot of work, via three scripts:</p>
<ul>
<li>Sort the output from genlist into dependency order using
<code>list2cds</code> for each arch in turn, outputting to
$(BDIR)/packages.$ARCH.
<li>Merge the output of those separate package lists (if necessary),
outputting to $(BDIR)/packages using <code>merge_package_lists</code>.
<li>Now we have a sorted list of (potentially multi-arch) packages
ready to start using. Make the temporary trees using that list - call
<code>make_disc_trees.pl</code>
</ul>
<h3><code>images:</code></h3>
<p>Using the trees from <code>image-trees:</code>, convert those trees
into CD/DVD ISO/jigdo files as required.</p>
<h3><code>image:</code> and <code>check-number-given:</code></h3>
<p>If you're short on space, will allow you to create images one ISO
at a time - specify <code>CD=n</code> on the make command line to just
make CD number n.</p>
<h3><code>imagesums:</code></h3>
<p>Use the <code>imagesums</code> script to generate md5sums for the
output images.</p>
<h2>Misc targets</h2>
<h3><code>update-popcon</code></h3>
<p>Update the sorting order for packages using usage stats from
popcon.debian.org.</p>
<h3><code>official_images:</code></h3>
<p>Simple wrapper that depends on all the needed bits in the right
order.</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="running.html">Prev - Running</a><br>
<a href="helpers.html">Next - The helper scripts, where most of the
work happens</a>
</body>
</html>