Debian Codegraph @

docs/makefile.html

raw
1 <html>
2 <head>
3 <title>The Makefile</title>
4 </head>
5 <body>
6 <h1>The Makefile</h1>
7
8 <p>A quick overview of the debian-cd Makefile: what it does, and
9 how.</p>
10
11 <h2>Variable setup and checking</h2>
12
13 <p>Simple sanity checking that all the needed variables from CONF.sh
14 are present and correct, and also set up some more internal
15 variables:</p>
16
17 <ul>
18
19 <li><code>BUILD_DATE</code> - simply, the date and time of the build
20 <li><code>ARCHES_NOSRC</code> - the list of arches specified, minus
21 source
22 <li><code>SOURCEONLY</code> - set only if we're building source and no
23 binaries
24 <li><code>INC_SOURCE</code> - set if we're building source at all
25 <li><em>lots of variables pointing to the helper scripts</em>
26 <li><code>BDIR</code> - the working dir for temporary files
27 <li><code>ADIR</code> - an alias for APTTMP, as set in CONF.sh
28 <li><code>DB_DIR</code> - points to a debootstrap temp dir under BDIR
29 <li><code>PATH</code> - we add the debootstrap /usr/sbin dir to the
30 path
31 <li><code>LATEST_DB</code> - the full path to the most recent version
32 of debootstrap in the archive
33
34 <h3><code>default:</code></h3>
35 <p>There is not a sensible default action for the Makefile (e.g. make
36 all), so simply print a message and return.</p>
37
38 <h3><code>ok:</code></h3>
39 <p>Simple sanity checking.</p>
40
41 <h2>General initialisation and cleanup</h2>
42
43 <h3><code>init:</code></h3>
44 <p>Depends on a group of trivial small rules - make the temp dirs as
45 necesssary, and extract the latest debootstrap deb from LATEST_DB
46 above.</p>
47
48 <h3><code>clean: and dir-clean:</code></h3>
49 <p>Clean up build tress.</p>
50
51 <h3><code>realclean: and distclean:</code></h3>
52 <p>Delete all temporary state.</p>
53
54 <h2>Package lists and apt setup</h2>
55
56 <h3><code>$(CODENAME)_status:</code></h3>
57 <p>Use the (maybe provided) default starting package list for
58 $(CODENAME). If that doesn't exist, fall back to "make status".</p>
59
60 <h3><code>status:</code> and <code>$(ADIR)/status:</code></h3>
61 <p>Create an initial list of the packages desired.</p>
62
63 <p>First, for BC and NETINST (aka INSTALLER_CD=1 or INSTALLER_CD=2),
64 simply create an empty list. For other CDs, grab the list of
65 Required/Important/Standard/Base packages from the Packages file.</p>
66
67 <p>Secondly, create/update the temporary apt db using
68 <code>apt-selection</code>.</p>
69
70 <p>Finally, use <code>apt-selection</code> to check the consistency of
71 the standard system in terms of dependencies. If needed, run
72 <code>make correctstatus</code> to add/remove packages.
73
74 <h3><code>correctstatus:</code></h3>
75 <p>Add/remove packages as needed to fix up the dependencies.</p>
76
77 <h3><code>apt-update:</code></h3>
78 <p>After setting up the default list of packages, run
79 <code>apt-selection update</code> for each of the arches, so we're
80 ready to ask apt to do real work for us.</p>
81
82 <h3><code>deletelist:</code></h3>
83 <p>Simple list cleanup</p>
84
85 <h3><code>packagelists:</code></h3>
86 <p>Helper for dependencies</p>
87
88 <h3><code>$(BDIR)/rawlist:</code></h3>
89 <p>Using debootstrap and the task file specified, generate a "raw"
90 (i.e. not cleanly formatted) list of the packages desired.</p>
91
92 <h3><code>genlist:</code>, <code>$(BDIR)/list</code>
93 <p>Clean up the rawlist files ready for use.</p>
94
95 <h2>Tree and image building</h2>
96
97 <h3><code>image-trees:</code></h3>
98 <p>Does a lot of work, via three scripts:</p>
99
100 <ul>
101 <li>Sort the output from genlist into dependency order using
102 <code>list2cds</code> for each arch in turn, outputting to
103 $(BDIR)/packages.$ARCH.
104 <li>Merge the output of those separate package lists (if necessary),
105 outputting to $(BDIR)/packages using <code>merge_package_lists</code>.
106 <li>Now we have a sorted list of (potentially multi-arch) packages
107 ready to start using. Make the temporary trees using that list - call
108 <code>make_disc_trees.pl</code>
109 </ul>
110
111 <h3><code>images:</code></h3>
112 <p>Using the trees from <code>image-trees:</code>, convert those trees
113 into CD/DVD ISO/jigdo files as required.</p>
114
115 <h3><code>image:</code> and <code>check-number-given:</code></h3>
116 <p>If you're short on space, will allow you to create images one ISO
117 at a time - specify <code>CD=n</code> on the make command line to just
118 make CD number n.</p>
119
120 <h3><code>imagesums:</code></h3>
121 <p>Use the <code>imagesums</code> script to generate md5sums for the
122 output images.</p>
123
124 <h2>Misc targets</h2>
125
126 <h3><code>update-popcon</code></h3>
127 <p>Update the sorting order for packages using usage stats from
128 popcon.debian.org.</p>
129
130 <h3><code>official_images:</code></h3>
131 <p>Simple wrapper that depends on all the needed bits in the right
132 order.</p>
133
134 <hr>
135 (c) Steve McIntyre &lt;[email protected]&gt;, December 2006. GPL v2<br>
136 <a href="running.html">Prev - Running</a><br>
137 <a href="helpers.html">Next - The helper scripts, where most of the
138 work happens</a>
139 </body>
140 </html>