Debian Codegraph @

pconf/FORMAT

raw
1 P L A T F O R M C O N F I G U R A T O R
2
3 FILE FORMAT SPECIFICATION
4
5
6 ABOUT
7 -----
8
9 This file describes the format of the Platform Configurator's
10 (pconf) platform configuration file format (platforms.ini).
11
12 LEGEND
13 ------
14
15 Comments start with a '#' character. Any '#' character found within
16 a value or parameter will be interprited as part of that value or
17 parameter (not interprited as a comment).
18
19 Parameters may be intended with initial tabs or spaces.
20
21 Values always start after the '=' character which is always following
22 a parameter, ie:
23
24 PREFIX = /usr/
25
26 If a value runs long, then do not put " around it. Instead use backslashes
27 to escape as " characters are read literally, example:
28
29 Description = The quick red foxes jumped over the "lazy" \
30 brown dog.
31
32
33 PARAMETERS: GLOBAL
34 ------------------
35
36 These parameters should be specified before all else, they do not
37 need to reside in any configuration blocks or appear in any particular
38 order other than appearing before any block parameters.
39
40
41 MakefileOutput specifies the output Makefile to generate, example:
42
43 MakefileOutput = Makefile.out
44
45
46 MakefileInputPrepend specifies a text file who's contents will be
47 literally prepended to the MakefileOutput, example:
48
49 MakefileInputPrepend = makefile_prepend.ini
50
51
52 MakefileInputAppend specifies a text file who's contents will be
53 literally appended to the MakefileOutput, example:
54
55 MakefileInputAppend = makefile_append.ini
56
57
58 MessageConfigStartup specifies any arbitary string you want to show
59 just before pconf starts scanning your system, example:
60
61 MessageConfigStartup = Checking your system...
62
63
64 MessagePlatformUnsupported specifies any arbitary string you want to show
65 when the specified platform is not defined in the platforms.ini file,
66 example:
67
68 MessagePlatformUnsupported = Sorry, that platform is not supported, \
69 please try a different or generic platform if available. Use --listall \
70 to obtain a complete list of platforms.
71
72
73 MessageDependFailed specifies any arbitary string you want to show
74 when one or more dependencies of the selected platform is not met,
75 example:
76
77 MessageDependFailed = Your missing some dependencies, use --force \
78 if you want to keep going next time.
79
80
81 MessageSuccess specifies any arbitary string you want to show when
82 pconf is done configuring and generating the MakefileOutput, example:
83
84 MessageSuccess = Type `make' to compile the program.
85
86
87
88 PARAMETER: PLATFORMS
89 --------------------
90
91 Platform specifies the start of a `platform specification block',
92 the value must be the name of the platform (preferably fetched from
93 uname), example:
94
95 Platform = Linux
96 Platform = UNIX
97
98 Once this value has been specified, subsequent platform related parameters
99 affect this `platform specification block' untill another Platform is
100 specified or end of file.
101
102
103 Description specifies the description of this platform, it may contain
104 some release notes or remarks that may not be readily apparent to the
105 end user, example:
106
107 Description = UNIX is generic, pick a more specific platform if \
108 available.
109
110
111 PREFIX specifies the prepended directory for installing the program,
112 for distributed UNIXes the value is /usr/local/ and plain UNIXes
113 is /usr/. This value can be overridden from the command line using
114 --prefix. Example:
115
116 PREFIX = /usr/
117
118
119 CFLAGS specifies the standard compiler flags for the platform, do not
120 include any compiler flags for particular features (see FeatureCFLAGS).
121 Example:
122
123 CFLAGS = -DNON_STANDARD -DWIERD_STUFF
124
125
126 INC_DIRS specifies additional include directories that the platform
127 does not normally search for, do not include any include directories
128 for particular features (see FeaturesINC_DIRS). Example:
129
130 INC_DIRS = -I/usr/nonstandard/include/
131
132
133 LIBS specifies the standard libraries for the platform that the program
134 needs to link to, do not include any libraries for particular features
135 (see FeatureLIBS). Example:
136
137 LIBS = -lnonstandard -lm
138
139
140 LIB_DIRS specifies the standard library paths for the platform that
141 the libraries specified in the LIBS parameter need to look for, do not
142 include any libraries for particular features (see FeatureLIB_DIRS).
143 Example:
144
145 LIB_DIRS = -I/usr/nonstandard/lib/
146
147
148 PlatformSearchPathInclude specifies an include path that is known to be
149 on the platform (values must be absolute paths, may be specified multiple
150 times), example:
151
152 PlatformSearchPathInclude = /usr/include/
153 PlatformSearchPathInclude = /usr/nonstandard/include/
154
155
156 PlatformSearchPathLib specifies a library path that is known to be
157 on the platform (values must be absolute paths, may be specified multiple
158 times), example:
159
160 PlatformSearchPathLib = /lib/
161 PlatformSearchPathLib = /usr/lib/
162
163
164 PlatformSearchPathEtc specifies a configuration files path that is
165 known to be on the platform (values must be absolute paths, may be
166 specified multiple times), example:
167
168 PlatformSearchPathEtc = /etc/
169 PlatformSearchPathEtc = /usr/etc/
170
171
172 PlatformSearchPathBin specifies a program files path that is known to be
173 on the platform (values must be absolute paths, may be specified multiple
174 times), example:
175
176 PlatformSearchPathBin = /bin/
177 PlatformSearchPathBin = /sbin/
178 PlatformSearchPathBin = /usr/bin/
179 PlatformSearchPathBin = /usr/sbin/
180 PlatformSearchPathBin = /usr/games/
181 PlatformSearchPathBin = /usr/X11R6/bin/
182
183
184 PlatformSearchPathData specifies a data files path that is known to be
185 on the platform (values must be absolute paths, may be specified multiple
186 times), example:
187
188 PlatformSearchPathData = /usr/share/icons/
189 PlatformSearchPathData = /usr/nonstandard/themes/
190
191
192 PARAMETER: FEATURE
193 ------------------
194
195 PlatformFeature specifies the start of a `feature specification block',
196 the value must be the name of the feature (any arbitary but user
197 recognizeable name can be used), example:
198
199 PlatformFeature = X Window Systems
200 PlatformFeature = Imlib
201 PlatformFeature = LibJSW
202
203 This parameter must be specified after a Platform parameter. Once this
204 value has been specified, subsequent feature related parameters affect
205 this `feature specification block' untill another PlatformFeature
206 is specified or end of file.
207
208 Features can be enabled or disabled from the command line using
209 --enable-<feature> or --disable-<feature> where <feature> is the name
210 of a PlatformFeature specified value.
211
212
213 Description specifies the description of this feature, it should contain
214 a short sentence describing the propose of this feature and when to
215 use it. Example:
216
217 Description = For joystick support, only available on Linuxes
218
219 URLHomePage specifies the url (ie used with web browsers and ftp clients)
220 to specify the web page for this particular feature, example:
221
222 URLHomePage = http://wolfpack.twu.net/libjsw/
223
224
225 URLDownload specifies the url of where to download required compoents
226 for this feature, example:
227
228 URLDownload = ftp://fox.mit.edu/pub/something.tar.bz2
229
230
231 MustExist specifies the default critera for existance of this feature;
232 if the value is Yes then this feature must be found on the system or
233 else configuration fails, if the value is No then this feature is not
234 searched for on the syste unless the user specificalled --enable'ed
235 this feature from the command line, if the value is Preferred then this
236 feature is searched for on the system and will be enabled if it is found
237 or disabled if it is not found, examples:
238
239 MustExist = Yes
240 MustExist = Preferred
241 MustExist = No
242
243
244 FeatureCFLAGS specifies a list of compiler flags to append to the CFLAGS
245 parameter's value if this feature is found and enabled, example:
246
247 FeatureCFLAGS = -DHAVE_X
248
249
250 FeatureINC_DIRS specifies a list of include directories to append to the
251 INC_DIRS parameter's value if this feature is found and enabled, example:
252
253 FeatureINC_DIRS = -I/usr/nonstandard/include/
254
255
256 FeatureLIBS specifies a list of libraries to append to the LIBS
257 parameter's value if this feature is found and enabled, example:
258
259 FeatureLIBS = -lX11 -lXext
260
261
262 FeatureLIB_DIR specifies a list of librariy directories to append to the
263 LIB_DIRS parameter's value if this feature is found and enabled, example:
264
265 FeatureLIB_DIR = -L/usr/X11R6/lib/
266
267
268
269 PARAMETER: FEATURE DEPENDENCY
270 -----------------------------
271
272 FeatureDepend specifies the start of a `dependency specification block',
273 the value must be the name of the dependency (preferably a conical
274 package name), example:
275
276 FeatureDepend = X11-lib
277
278 This parameter must be specified after a PlatformFeature parameter. Once
279 this value has been specified, subsequent dependency related parameters
280 affect this `dependency specification block' untill another
281 FeatureDepend is specified or end of file.
282
283
284 DependType specifies the type of this dependency, valid values can be;
285 Program, Library, Header, Config, or Data which will indicate the
286 location of the dependency objects to be searched for in the
287 paths (respectivly) PlatformSearchPathBin, PlatformSearchPathLib,
288 PlatformSearchPathInclude, PlatformSearchPathEtc,
289 and PlatformSearchPathData. Example:
290
291 DependType = Library
292
293 Which means this dependencie's files will be searched for in the paths
294 defined by PlatformSearchPathLib parameters.
295
296
297 MustExist specifies if this dependencie's objects must exist. This value
298 should always be Yes.
299
300 MustExist = Yes
301
302
303 DependPath specifies the name of the object (partial path allowed as
304 needed, but should never be absolute path). This value is searched for
305 depending on this dependency type (specified by DependType) in the
306 appropriate PlatformSearchPath* parameters, example:
307
308 DependPath = libX11.so
309
310
311 DependGrepString specifies the name of a string to search for in a matched
312 dependent object (which means this parameter must be specified after each
313 DependPath parameter!), example:
314
315 DependPath = libX11.so
316 DependGrepString = XOpenDisplay
317
318 SAMPLES
319 -------
320
321 Example of Linux platform support, this is just one platform section
322 specifying Linux specific details and one feature for X Window Systems
323 (Note that this is not a compelte Linux platform support, you may need
324 to add more paths and related details):
325
326 MakefileOutput = Makefile.out
327 Platform = Linux
328 Description = Penguins rule!
329 PREFIX = /usr/
330 CFLAGS =
331 LIBS = -lm
332 LIB_DIR =
333 PlatformSearchPathInclude = /usr/include/
334 PlatformSearchPathInclude = /usr/X11R6/include/
335 PlatformSearchPathLib = /lib/
336 PlatformSearchPathLib = /usr/lib/
337 PlatformSearchPathLib = /usr/X11R6/lib/
338 PlatformSearchPathEtc = /etc/
339 PlatformFeature = X Window Systems
340 MustExist = Preferred
341 FeatureLIBS = -lX11 -lXext
342 FeatureLIB_DIR = -L/usr/X11R6/lib/
343 FeatureDepend = X11-lib
344 DependType = Library
345 MustExist = Yes
346 DependPath = libX11.so
347 DependGrepString = XOpenDisplay
348 FeatureDepend = X11-devel
349 DependType = Header
350 MustExist = Yes
351 DependPath = X11/Xlib.h
352 DependGrepString = XNextEvent
353
354 When pconf is runned with the platforms.ini (that contains the above data)
355 and the platform name "linux" the above will be matched and pconf will
356 begin checking for any features and its dependencies. Since feature `X
357 Window Systems' is set to Preferred, pconf will check if it exists and
358 then decide to enable it or not:
359
360 pconf platforms.ini linux
361
362 To specifically require that `X Window Systems' be enabled:
363
364 pconf platforms.ini linux --enable-"X Window Systems"
365
366 And the same, with an override of the prefix:
367
368 pconf platforms.ini linux --prefix=/tmp/ --enable-"X Window Systems"
369
370 List of all platforms in any platforms.ini can be obtained with any
371 of the following (incrementing in detail):
372
373 pconf platforms.ini
374 pconf platforms.ini --list
375 pconf platforms.ini --listall
376
377
378 The portion of the output Makefile (specified by MakefileOutput) generated
379 by pconf will provide values for the parameters; PREFIX, CFLAGS, INC_DIRS,
380 LIBS, LIB_DIRS, CC, and CPP.
381
382
383 RFC
384 ---
385
386 Hopefully you have noticed by now that from the user end side this
387 is pretty close to how AutoConf implments things with the option of
388 specifying a preset platform and platforms configuration file which both
389 can be specified via script.
390
391 Platform Configurator was created due to the lack of documentation and
392 problems our corperation has encountered with it. We understand that
393 AutoConf has worked for others but with the time and effort that we have
394 expended to adapt and use AutoConf has not been negateful over the option
395 of creating our own pconf system.
396
397 If you find pconf useful, you are free to use it under the GNU public
398 license.
399
400 Please send comments and questions to WPE, for list of contact addresses
401 see http://wolfpack.twu.net/contacts.html