source: BLFS/xsl/gen_config.xsl@ dedd502

ablfs-more trunk
Last change on this file since dedd502 was 0a19439, checked in by Pierre Labastie <pierre.labastie@…>, 20 months ago

Implementation of dependency checking 1

Generate a switch for configuration

  • Property mode set to 100644
File size: 10.2 KB
RevLine 
[e576789]1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version="1.0">
5
6 <xsl:output method="text"
7 encoding='ISO-8859-1'/>
8
9 <xsl:template match="/">
10 <xsl:apply-templates select="//list"/>
11 <xsl:text>comment ""
12
[2b3edd2]13menu "Build settings"
[e576789]14
[2b3edd2]15 choice
16 prompt "Mail server for resolving the MTA dependency"
[e576789]17 config MS_sendmail
18 bool "sendmail"
19 config MS_postfix
20 bool "postfix"
21 config MS_exim
22 bool "exim"
[2b3edd2]23 endchoice
24 config MAIL_SERVER
[e576789]25 string
[a4af6811]26 default "sendmail" if MS_sendmail
27 default "postfix" if MS_postfix
28 default "exim" if MS_exim
[e576789]29
[2b3edd2]30 choice
[e576789]31 prompt "Dependency level"
32 default DEPLVL_2
[2b3edd2]33 help
34 Packages included in the dependency graph. Note that the graph
35 itself contains all the dependency information relating those
36 packages.
[e576789]37
38 config DEPLVL_1
39 bool "Required dependencies only"
40
41 config DEPLVL_2
[2140f22]42 bool "Required plus recommended dependencies"
[e576789]43
44 config DEPLVL_3
[2140f22]45 bool "Req/rec plus optional dependencies of requested package(s)"
46
47 config DEPLVL_4
48 bool "All non external dependencies"
[e576789]49
[2b3edd2]50 endchoice
51 config optDependency
[e576789]52 int
53 default 1 if DEPLVL_1
54 default 2 if DEPLVL_2
55 default 3 if DEPLVL_3
[2140f22]56 default 4 if DEPLVL_4
[e576789]57
[2b3edd2]58 config LANGUAGE
[625cb14]59 string "LANG variable in the form ll_CC.charmap[@modifiers]"
60 default "en_US.UTF-8"
61 help
62 Because of the book layout, the 3 fields, ll, CC and charmap are
[2b3edd2]63 mandatory. The @modifier is honoured if present.
[30732c6a]64
[2b3edd2]65 config SUDO
[e576789]66 bool "Build as User"
67 default y
68 help
[2b3edd2]69 Select if sudo will be used (you build as a normal user)
70 otherwise sudo is not needed (you build as root)
[945ccaa]71
[2b3edd2]72 config WRAP_INSTALL
[945ccaa]73 bool "Use `porg style' package management"
74 default n
75 help
[2b3edd2]76 Select if you want the installation commands to be wrapped
77 between "wrapInstall '" and "' ; packInstall" functions,
78 where wrapInstall is used to set up a LD_PRELOAD library (for
79 example using porg), and packInstall makes the package tarball
80
81 config PACK_INSTALL
82 string "Location of the packInstall.sh script"
83 default "/blfs_root/packInstall.sh" if !SUDO
84 default "$HOME/blfs_root/packInstall.sh" if SUDO
85 depends on WRAP_INSTALL
86 help
87 This script is needed for the proper operation of the
88 `porg style' package management. Provide an absolute
89 path.
90
91 config DEL_LA_FILES
[0a19439]92 bool "Remove libtool .la files after package installation"
93 default y
94 help
[2b3edd2]95 This option should be active on any system mixing libtool
96 and meson build systems. ImageMagick .la files are preserved.
[67c3df4]97
[2b3edd2]98 config STATS
[0a19439]99 bool "Generate statistics for the requested package(s)"
100 default n
101 help
[2b3edd2]102 If you want timing and memory footprint statistics to be
103 generated for the packages you build (not their dependencies),
104 set this option to y. Due to the book layout, several scripts
105 are not functional in this case. Please review them.
106
[0a19439]107 config DEP_CHECK
108 bool "Check dependencies of the requested package(s)"
109 default n
110 depends on WRAP_INSTALL
111 help
112 Setting this option does not work if more than one package
113 is selected. It will do the following:
114 - Build the dependency tree and generate a build ordered list
115 disregarding already installed packages
116 - Generate the scripts for the dependencies not already
117 installed (as usual)
118 - Generate a stript that:
119 + removes all unneeded packages using porg
120 (at this point the blfs_tools cannot be used anymore,
121 and your system may be non functional, so use a console
122 for that, not a graphical environment)
123 + installs the package
124 + restores all the previously removed packages
125 Note that this script may not be the last one, if there are runtime
126 dependencies
127
[2b3edd2]128endmenu
129
130menu "Build Layout"
131 config SRC_ARCHIVE
132 string "Directory of sources"
133 default "/sources"
134 config SRC_SUBDIRS
135 bool "Downloads sources to subdirectories"
136 default n
137 help
138 If this option is set, the sources will be downloaded and archived
139 into a subdirectory of the source directory, one for each page
140 of the book. Otherwise they are downloaded and archived directly
141 into the source directory
142 config BUILD_ROOT
143 string "Build directory"
144 default "/sources"
145 help
146 Directory where the build occurs. It can be the same as the
147 source directory, provided the setting of subdirectories is
148 different
149 config BUILD_SUBDIRS
150 bool "Build into subdirectories"
151 default y
152 help
153 If this option is set, the sources will be extracted into
154 subdirectories of the build directory. Otherwise, they will be
155 directly extracted into the build directory
156 config KEEP_FILES
157 bool "Keep source directory"
158 default n
159 help
160 Set this option if you want to keep the build directories
161 for further examination after installing the package
162endmenu
163
164menu "Optimization"
165 config JOBS
166 int "Number of parallel jobs"
167 default 0
168 help
169 This number will get passed to make or ninja, unless set
170 to 0, in which case, it is set to the number of processors
171 on line. Note that some packages do not respect this setting.
172 Also, "-j1" is always passed to make for install (and nothing
173 to ninja).
174 config CFG_CFLAGS
175 string "Content of variable CFLAGS"
176 default "EMPTY"
177 help
178 If set to the special string "EMPTY", then CFLAGS will be
179 unset before starting the script. Otherwise, there is no
180 content check for this variable. Double check for typos!
181 config CFG_CXXFLAGS
182 string "Content of variable CXXFLAGS"
183 default "EMPTY"
184 help
185 If set to the special string "EMPTY", then CXXFLAGS will be
186 unset before starting the script. Otherwise, there is no
187 content check for this variable. Double check for typos!
188 config CFG_LDFLAGS
189 string "Content of variable LDFLAGS"
190 default "EMPTY"
191 help
192 If set to the special string "EMPTY", then LDFLAGS will be
193 unset before starting the script. Otherwise, there is no
194 content check for this variable. Double check for typos!
195endmenu
[e576789]196</xsl:text>
197 </xsl:template>
198
199 <xsl:template match="list">
200 <xsl:if
201 test=".//*[self::package or self::module]
202 [(version and not(inst-version)) or
203 string(version) != string(inst-version)]">
[2b3edd2]204 <xsl:text>menuconfig&#9;MENU_</xsl:text>
[e576789]205 <xsl:value-of select="@id"/>
206 <xsl:text>
207bool&#9;"</xsl:text>
208 <xsl:value-of select="name"/>
209 <xsl:text>"
210default&#9;n
211
[2b3edd2]212if&#9;MENU_</xsl:text>
[e576789]213 <xsl:value-of select="@id"/>
214 <xsl:text>
215
216</xsl:text>
217 <xsl:apply-templates select="sublist"/>
[2b3edd2]218 <xsl:text>endif
[e576789]219
220</xsl:text>
221 </xsl:if>
222 </xsl:template>
223
224 <xsl:template match="sublist">
225 <xsl:if
226 test=".//*[self::package or self::module]
227 [(version and not(inst-version)) or
228 string(version) != string(inst-version)]">
[2b3edd2]229 <xsl:text>&#9;menuconfig&#9;MENU_</xsl:text>
[e576789]230 <xsl:value-of select="@id"/>
231 <xsl:text>
232&#9;bool&#9;"</xsl:text>
233 <xsl:value-of select="name"/>
234 <xsl:text>"
235&#9;default&#9;n
236
[2b3edd2]237&#9;if&#9;MENU_</xsl:text>
[e576789]238 <xsl:value-of select="@id"/>
239 <xsl:text>
240
241</xsl:text>
242 <xsl:apply-templates select="package"/>
[2b3edd2]243 <xsl:text>&#9;endif
[e576789]244
245</xsl:text>
246 </xsl:if>
247 </xsl:template>
248
249 <xsl:template match="package">
250 <xsl:if
251 test="(version and not(inst-version)) or
252 string(version) != string(inst-version)">
253 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
254 <xsl:value-of select="name"/>
255 <xsl:text>
256&#9;&#9;bool&#9;"</xsl:text>
257 <xsl:value-of select="name"/>
258 <xsl:text> </xsl:text>
259 <xsl:value-of select="version"/>
260 <xsl:if test="inst-version">
261 <xsl:text> [Installed </xsl:text>
262 <xsl:value-of select="inst-version"/>
263 <xsl:text>]</xsl:text>
264 </xsl:if>
265 <xsl:text>"
266&#9;&#9;default&#9;n
267
268</xsl:text>
269 </xsl:if>
270 <xsl:if
271 test="not(version) and ./module[not(inst-version) or
272 string(version) != string(inst-version)]">
[2b3edd2]273 <xsl:text>&#9;&#9;menuconfig&#9;MENU_</xsl:text>
[6e28f3c]274 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]275 <xsl:text>
276&#9;&#9;bool&#9;"</xsl:text>
277 <xsl:value-of select="name"/>
278 <xsl:text>"
279&#9;&#9;default&#9;n
280
[2b3edd2]281&#9;&#9;if&#9;MENU_</xsl:text>
[6e28f3c]282 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]283 <xsl:text>
284
285</xsl:text>
286 <xsl:apply-templates select="module"/>
[2b3edd2]287 <xsl:text>&#9;&#9;endif
[e576789]288
289</xsl:text>
290 </xsl:if>
291 </xsl:template>
292
293 <xsl:template match="module">
294 <xsl:if
295 test="not(inst-version) or
296 string(version) != string(inst-version)">
297 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
298 <xsl:value-of select="name"/>
299 <xsl:text>
300&#9;&#9;&#9;bool&#9;"</xsl:text>
301 <xsl:value-of select="name"/>
302 <xsl:text> </xsl:text>
303 <xsl:value-of select="version"/>
304 <xsl:if test="inst-version">
305 <xsl:text> [Installed </xsl:text>
306 <xsl:value-of select="inst-version"/>
307 <xsl:text>]</xsl:text>
308 </xsl:if>
309 <xsl:text>"
310&#9;&#9;&#9;default&#9;</xsl:text>
311 <xsl:choose>
312 <xsl:when test="contains(../name,'xorg')">
313 <xsl:text>y
314
315</xsl:text>
316 </xsl:when>
317 <xsl:otherwise>
318 <xsl:text>n
319
320</xsl:text>
321 </xsl:otherwise>
322 </xsl:choose>
323 </xsl:if>
324 </xsl:template>
325
326</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.