README 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. Configurations of OpenSSL target platforms
  2. ==========================================
  3. Target configurations are a collection of facts that we know about
  4. different platforms and their capabilities. We organise them in a
  5. hash table, where each entry represent a specific target.
  6. In each table entry, the following keys are significant:
  7. inherit_from => Other targets to inherit values from.
  8. Explained further below. [1]
  9. template => Set to 1 if this isn't really a platform
  10. target. Instead, this target is a template
  11. upon which other targets can be built.
  12. Explained further below. [1]
  13. sys_id => System identity for systems where that
  14. is difficult to determine automatically.
  15. cc => The compiler command, usually one of "cc",
  16. "gcc" or "clang". This command is normally
  17. also used to link object files and
  18. libraries into the final program.
  19. cflags => Flags that are used at all times when
  20. compiling.
  21. defines => As an alternative, macro definitions may be
  22. present here instead of in `cflags'. If
  23. given here, they MUST be as an array of the
  24. string such as "MACRO=value", or just
  25. "MACRO" for definitions without value.
  26. shared_cflag => Extra compilation flags used when
  27. compiling for shared libraries, typically
  28. something like "-fPIC".
  29. (linking is a complex thing, see [3] below)
  30. ld => Linker command, usually not defined
  31. (meaning the compiler command is used
  32. instead).
  33. (NOTE: this is here for future use, it's
  34. not implemented yet)
  35. lflags => Flags that are used when linking apps.
  36. shared_ldflag => Flags that are used when linking shared
  37. or dynamic libraries.
  38. plib_lflags => Extra linking flags to appear just before
  39. the libraries on the command line.
  40. ex_libs => Extra libraries that are needed when
  41. linking.
  42. ar => The library archive command, the default is
  43. "ar".
  44. (NOTE: this is here for future use, it's
  45. not implemented yet)
  46. arflags => Flags to be used with the library archive
  47. command.
  48. ranlib => The library archive indexing command, the
  49. default is 'ranlib' it it exists.
  50. unistd => An alternative header to the typical
  51. '<unistd.h>'. This is very rarely needed.
  52. shared_extension => File name extension used for shared
  53. libraries.
  54. obj_extension => File name extension used for object files.
  55. On unix, this defaults to ".o" (NOTE: this
  56. is here for future use, it's not
  57. implemented yet)
  58. exe_extension => File name extension used for executable
  59. files. On unix, this defaults to "" (NOTE:
  60. this is here for future use, it's not
  61. implemented yet)
  62. thread_scheme => The type of threads is used on the
  63. configured platform. Currently known
  64. values are "(unknown)", "pthreads",
  65. "uithreads" (a.k.a solaris threads) and
  66. "winthreads". Except for "(unknown)", the
  67. actual value is currently ignored but may
  68. be used in the future. See further notes
  69. below [2].
  70. dso_scheme => The type of dynamic shared objects to build
  71. for. This mostly comes into play with
  72. engines, but can be used for other purposes
  73. as well. Valid values are "DLFCN"
  74. (dlopen() et al), "DLFCN_NO_H" (for systems
  75. that use dlopen() et al but do not have
  76. fcntl.h), "DL" (shl_load() et al), "WIN32"
  77. and "VMS".
  78. perlasm_scheme => The perlasm method used to created the
  79. assembler files used when compiling with
  80. assembler implementations.
  81. shared_target => The shared library building method used.
  82. This is a target found in Makefile.shared.
  83. build_scheme => The scheme used to build up a Makefile.
  84. In its simplest form, the value is a string
  85. with the name of the build scheme.
  86. The value may also take the form of a list
  87. of strings, if the build_scheme is to have
  88. some options. In this case, the first
  89. string in the list is the name of the build
  90. scheme.
  91. Currently recognised build scheme is "unified".
  92. For the "unified" build scheme, this item
  93. *must* be an array with the first being the
  94. word "unified" and the second being a word
  95. to identify the platform family.
  96. multilib => On systems that support having multiple
  97. implementations of a library (typically a
  98. 32-bit and a 64-bit variant), this is used
  99. to have the different variants in different
  100. directories.
  101. bn_ops => Building options (was just bignum options
  102. in the earlier history of this option,
  103. hence the name). This a string of words
  104. that describe properties on the designated
  105. target platform, such as the type of
  106. integers used to build up the bitnum,
  107. different ways to implement certain ciphers
  108. and so on. To fully comprehend the
  109. meaning, the best is to read the affected
  110. source.
  111. The valid words are:
  112. BN_LLONG use 'unsigned long long' in
  113. some bignum calculations.
  114. This has no value when
  115. SIXTY_FOUR_BIT or
  116. SIXTY_FOUR_BIT_LONG is given.
  117. RC4_CHAR makes the basic RC4 unit of
  118. calculation an unsigned char.
  119. SIXTY_FOUR_BIT processor registers
  120. are 64 bits, long is
  121. 32 bits, long long is
  122. 64 bits.
  123. SIXTY_FOUR_BIT_LONG processor registers
  124. are 64 bits, long is
  125. 64 bits.
  126. THIRTY_TWO_BIT processor registers
  127. are 32 bits.
  128. EXPORT_VAR_AS_FN for shared libraries,
  129. export vars as
  130. accessor functions.
  131. apps_extra_src => Extra source to build apps/openssl, as
  132. needed by the target.
  133. cpuid_asm_src => assembler implementation of cpuid code as
  134. well as OPENSSL_cleanse().
  135. Default to mem_clr.c
  136. bn_asm_src => Assembler implementation of core bignum
  137. functions.
  138. Defaults to bn_asm.c
  139. ec_asm_src => Assembler implementation of core EC
  140. functions.
  141. des_asm_src => Assembler implementation of core DES
  142. encryption functions.
  143. Defaults to 'des_enc.c fcrypt_b.c'
  144. aes_asm_src => Assembler implementation of core AES
  145. functions.
  146. Defaults to 'aes_core.c aes_cbc.c'
  147. bf_asm_src => Assembler implementation of core BlowFish
  148. functions.
  149. Defaults to 'bf_enc.c'
  150. md5_asm_src => Assembler implementation of core MD5
  151. functions.
  152. sha1_asm_src => Assembler implementation of core SHA1,
  153. functions, and also possibly SHA256 and
  154. SHA512 ones.
  155. cast_asm_src => Assembler implementation of core CAST
  156. functions.
  157. Defaults to 'c_enc.c'
  158. rc4_asm_src => Assembler implementation of core RC4
  159. functions.
  160. Defaults to 'rc4_enc.c rc4_skey.c'
  161. rmd160_asm_src => Assembler implementation of core RMD160
  162. functions.
  163. rc5_asm_src => Assembler implementation of core RC5
  164. functions.
  165. Defaults to 'rc5_enc.c'
  166. wp_asm_src => Assembler implementation of core WHIRLPOOL
  167. functions.
  168. cmll_asm_src => Assembler implementation of core CAMELLIA
  169. functions.
  170. Defaults to 'camellia.c cmll_misc.c cmll_cbc.c'
  171. modes_asm_src => Assembler implementation of cipher modes,
  172. currently the functions gcm_gmult_4bit and
  173. gcm_ghash_4bit.
  174. padlock_asm_src => Assembler implementation of core parts of
  175. the padlock engine. This is mandatory on
  176. any platform where the padlock engine might
  177. actually be built.
  178. [1] as part of the target configuration, one can have a key called
  179. 'inherit_from' that indicate what other configurations to inherit
  180. data from. These are resolved recursively.
  181. Inheritance works as a set of default values that can be overridden
  182. by corresponding key values in the inheriting configuration.
  183. Note 1: any configuration table can be used as a template.
  184. Note 2: pure templates have the attribute 'template => 1' and
  185. cannot be used as build targets.
  186. If several configurations are given in the 'inherit_from' array,
  187. the values of same attribute are concatenated with space
  188. separation. With this, it's possible to have several smaller
  189. templates for different configuration aspects that can be combined
  190. into a complete configuration.
  191. instead of a scalar value or an array, a value can be a code block
  192. of the form 'sub { /* your code here */ }'. This code block will
  193. be called with the list of inherited values for that key as
  194. arguments. In fact, the concatenation of strings is really done
  195. by using 'sub { join(" ",@_) }' on the list of inherited values.
  196. An example:
  197. "foo" => {
  198. template => 1,
  199. haha => "ha ha",
  200. hoho => "ho",
  201. ignored => "This should not appear in the end result",
  202. },
  203. "bar" => {
  204. template => 1,
  205. haha => "ah",
  206. hoho => "haho",
  207. hehe => "hehe"
  208. },
  209. "laughter" => {
  210. inherit_from => [ "foo", "bar" ],
  211. hehe => sub { join(" ",(@_,"!!!")) },
  212. ignored => "",
  213. }
  214. The entry for "laughter" will become as follows after processing:
  215. "laughter" => {
  216. haha => "ha ha ah",
  217. hoho => "ho haho",
  218. hehe => "hehe !!!",
  219. ignored => ""
  220. }
  221. [2] OpenSSL is built with threading capabilities unless the user
  222. specifies 'no-threads'. The value of the key 'thread_scheme' may
  223. be "(unknown)", in which case the user MUST give some compilation
  224. flags to Configure.
  225. [3] OpenSSL has three types of things to link from object files or
  226. static libraries:
  227. - shared libraries; that would be libcrypto and libssl.
  228. - shared objects (sometimes called dynamic libraries); that would
  229. be the engines.
  230. - applications; those are apps/openssl and all the test apps.
  231. Very roughly speaking, linking is done like this (words in braces
  232. represent the configuration settings documented at the beginning
  233. of this file):
  234. shared libraries:
  235. {ld} $(CFLAGS) {shared_ldflag} -shared -o libfoo.so \
  236. -Wl,--whole-archive libfoo.a -Wl,--no-whole-archive \
  237. {plib_lflags} -lcrypto {ex_libs}
  238. shared objects:
  239. {ld} $(CFLAGS) {shared_ldflag} -shared -o libeng.so \
  240. blah1.o blah2.o {plib_lflags} -lcrypto {ex_libs}
  241. applications:
  242. {ld} $(CFLAGS) {lflags} -o app \
  243. app1.o utils.o {plib_lflags} -lssl -lcrypto {ex_libs}
  244. Historically, the target configurations came in form of a string with
  245. values separated by colons. This use is deprecated. The string form
  246. looked like this:
  247. "target" => "{cc}:{cflags}:{unistd}:{thread_cflag}:{sys_id}:{lflags}:{bn_ops}:{cpuid_obj}:{bn_obj}:{ec_obj}:{des_obj}:{aes_obj}:{bf_obj}:{md5_obj}:{sha1_obj}:{cast_obj}:{rc4_obj}:{rmd160_obj}:{rc5_obj}:{wp_obj}:{cmll_obj}:{modes_obj}:{padlock_obj}:{perlasm_scheme}:{dso_scheme}:{shared_target}:{shared_cflag}:{shared_ldflag}:{shared_extension}:{ranlib}:{arflags}:{multilib}"
  248. Build info files
  249. ================
  250. The build.info files that are spread over the source tree contain the
  251. minimum information needed to build and distribute OpenSSL. It uses a
  252. simple and yet fairly powerful language to determine what needs to be
  253. built, from what sources, and other relationships between files.
  254. For every build.info file, all file references are relative to the
  255. directory of the build.info file for source files, and the
  256. corresponding build directory for built files if the build tree
  257. differs from the source tree.
  258. When processed, every line is processed with the perl module
  259. Text::Template, using the delimiters "{-" and "-}". The hashes
  260. %config and %target are passed to the perl fragments, along with
  261. $sourcedir and $builddir, which are the locations of the source
  262. directory for the current build.info file and the corresponding build
  263. directory, all relative to the top of the build tree.
  264. To begin with, things to be built are declared by setting specific
  265. variables:
  266. PROGRAMS=foo bar
  267. LIBS=libsomething
  268. ENGINES=libeng
  269. SCRIPTS=myhack
  270. EXTRA=file1 file2
  271. Note that the files mentioned for PROGRAMS, LIBS and ENGINES *must* be
  272. without extensions. The build file templates will figure them out.
  273. For each thing to be built, it is then possible to say what sources
  274. they are built from:
  275. PROGRAMS=foo bar
  276. SOURCE[foo]=foo.c common.c
  277. SOURCE[bar]=bar.c extra.c common.c
  278. It's also possible to tell some other dependencies:
  279. DEPEND[foo]=libsomething
  280. DEPEND[libbar]=libsomethingelse
  281. (it could be argued that 'libsomething' and 'libsomethingelse' are
  282. source as well. However, the files given through SOURCE are expected
  283. to be located in the source tree while files given through DEPEND are
  284. expected to be located in the build tree)
  285. For some libraries, we maintain files with public symbols and their
  286. slot in a transfer vector (important on some platforms). It can be
  287. declared like this:
  288. ORDINALS[libcrypto]=crypto
  289. The value is not the name of the file in question, but rather the
  290. argument to util/mkdef.pl that indicates which file to use.
  291. One some platforms, shared libraries come with a name that's different
  292. from their static counterpart. That's declared as follows:
  293. SHARED_NAME[libfoo]=cygfoo-{- $config{shlibver} -}
  294. The example is from Cygwin, which has a required naming convention.
  295. Sometimes, it makes sense to rename an output file, for example a
  296. library:
  297. RENAME[libfoo]=libbar
  298. That lines has "libfoo" get renamed to "libbar". While it makes no
  299. sense at all to just have a rename like that (why not just use
  300. "libbar" everywhere?), it does make sense when it can be used
  301. conditionally. See a little further below for an example.
  302. In some cases, it's desirable to include some source files in the
  303. shared form of a library only:
  304. SHARED_SOURCE[libfoo]=dllmain.c
  305. For any file to be built, it's also possible to tell what extra
  306. include paths the build of their source files should use:
  307. INCLUDE[foo]=include
  308. In some cases, one might want to generate some source files from
  309. others, that's done as follows:
  310. GENERATE[foo.s]=asm/something.pl $(CFLAGS)
  311. GENERATE[bar.s]=asm/bar.S
  312. The value of each GENERATE line is a command line or part of it.
  313. Configure places no rules on the command line, except the the first
  314. item muct be the generator file. It is, however, entirely up to the
  315. build file template to define exactly how those command lines should
  316. be handled, how the output is captured and so on.
  317. Sometimes, the generator file itself depends on other files, for
  318. example if it is a perl script that depends on other perl modules.
  319. This can be expressed using DEPEND like this:
  320. DEPEND[asm/something.pl]=../perlasm/Foo.pm
  321. There may also be cases where the exact file isn't easily specified,
  322. but an inclusion directory still needs to be specified. INCLUDE can
  323. be used in that case:
  324. INCLUDE[asm/something.pl]=../perlasm
  325. NOTE: GENERATE lines are limited to one command only per GENERATE.
  326. As a last resort, it's possible to have raw build file lines, between
  327. BEGINRAW and ENDRAW lines as follows:
  328. BEGINRAW[Makefile(unix)]
  329. haha.h: {- $builddir -}/Makefile
  330. echo "/* haha */" > haha.h
  331. ENDRAW[Makefile(unix)]
  332. The word withing square brackets is the build_file configuration item
  333. or the build_file configuration item followed by the second word in the
  334. build_scheme configuration item for the configured target within
  335. parenthesis as shown above. For example, with the following relevant
  336. configuration items:
  337. build_file => "build.ninja"
  338. build_scheme => [ "unified", "unix" ]
  339. ... these lines will be considered:
  340. BEGINRAW[build.ninja]
  341. build haha.h: echo "/* haha */" > haha.h
  342. ENDRAW[build.ninja]
  343. BEGINRAW[build.ninja(unix)]
  344. build hoho.h: echo "/* hoho */" > hoho.h
  345. ENDRAW[build.ninja(unix)]
  346. Should it be needed because the recipes within a RAW section might
  347. clash with those generated by Configure, it's possible to tell it
  348. not to generate them with the use of OVERRIDES, for example:
  349. SOURCE[libfoo]=foo.c bar.c
  350. OVERRIDES=bar.o
  351. BEGINRAW[Makefile(unix)]
  352. bar.o: bar.c
  353. $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
  354. ENDRAW[Makefile(unix)]
  355. See the documentation further up for more information on configuration
  356. items.
  357. Finally, you can have some simple conditional use of the build.info
  358. information, looking like this:
  359. IF[1]
  360. something
  361. ELSIF[2]
  362. something other
  363. ELSE
  364. something else
  365. ENDIF
  366. The expression in square brackets is interpreted as a string in perl,
  367. and will be seen as true if perl thinks it is, otherwise false. For
  368. example, the above would have "something" used, since 1 is true.
  369. Together with the use of Text::Template, this can be used as
  370. conditions based on something in the passed variables, for example:
  371. IF[{- $disabled{shared} -}]
  372. LIBS=libcrypto
  373. SOURCE[libcrypto]=...
  374. ELSE
  375. LIBS=libfoo
  376. SOURCE[libfoo]=...
  377. ENDIF
  378. or:
  379. # VMS has a cultural standard where all libraries are prefixed.
  380. # For OpenSSL, the choice is 'ossl_'
  381. IF[{- $config{target} =~ /^vms/ -}]
  382. RENAME[libcrypto]=ossl_libcrypto
  383. RENAME[libssl]=ossl_libssl
  384. ENDIF
  385. Build-file programming with the "unified" build system
  386. ======================================================
  387. "Build files" are called "Makefile" on Unix-like operating systems,
  388. "descrip.mms" for MMS on VMS, "makefile" for nmake on Windows, etc.
  389. To use the "unified" build system, the target configuration needs to
  390. set the three items 'build_scheme', 'build_file' and 'build_command'.
  391. In the rest of this section, we will assume that 'build_scheme' is set
  392. to "unified" (see the configurations documentation above for the
  393. details).
  394. For any name given by 'build_file', the "unified" system expects a
  395. template file in Configurations/ named like the build file, with
  396. ".tmpl" appended, or in case of possible ambiguity, a combination of
  397. the second 'build_scheme' list item and the 'build_file' name. For
  398. example, if 'build_file' is set to "Makefile", the template could be
  399. Configurations/Makefile.tmpl or Configurations/unix-Makefile.tmpl.
  400. In case both Configurations/unix-Makefile.tmpl and
  401. Configurations/Makefile.tmpl are present, the former takes
  402. precedence.
  403. The build-file template is processed with the perl module
  404. Text::Template, using "{-" and "-}" as delimiters that enclose the
  405. perl code fragments that generate configuration-dependent content.
  406. Those perl fragments have access to all the hash variables from
  407. configdata.pem.
  408. The build-file template is expected to define at least the following
  409. perl functions in a perl code fragment enclosed with "{-" and "-}".
  410. They are all expected to return a string with the lines they produce.
  411. generatesrc - function that produces build file lines to generate
  412. a source file from some input.
  413. It's called like this:
  414. generatesrc(src => "PATH/TO/tobegenerated",
  415. generator => [ "generatingfile", ... ]
  416. generator_incs => [ "INCL/PATH", ... ]
  417. generator_deps => [ "dep1", ... ]
  418. generator => [ "generatingfile", ... ]
  419. incs => [ "INCL/PATH", ... ],
  420. deps => [ "dep1", ... ],
  421. intent => one of "libs", "dso", "bin" );
  422. 'src' has the name of the file to be generated.
  423. 'generator' is the command or part of command to
  424. generate the file, of which the first item is
  425. expected to be the file to generate from.
  426. generatesrc() is expected to analyse and figure out
  427. exactly how to apply that file and how to capture
  428. the result. 'generator_incs' and 'generator_deps'
  429. are include directories and files that the generator
  430. file itself depends on. 'incs' and 'deps' are
  431. include directories and files that are used if $(CC)
  432. is used as an intermediary step when generating the
  433. end product (the file indicated by 'src'). 'intent'
  434. indicates what the generated file is going to be
  435. used for.
  436. src2obj - function that produces build file lines to build an
  437. object file from source files and associated data.
  438. It's called like this:
  439. src2obj(obj => "PATH/TO/objectfile",
  440. srcs => [ "PATH/TO/sourcefile", ... ],
  441. deps => [ "dep1", ... ],
  442. incs => [ "INCL/PATH", ... ]
  443. intent => one of "lib", "dso", "bin" );
  444. 'obj' has the intended object file *without*
  445. extension, src2obj() is expected to add that.
  446. 'srcs' has the list of source files to build the
  447. object file, with the first item being the source
  448. file that directly corresponds to the object file.
  449. 'deps' is a list of explicit dependencies. 'incs'
  450. is a list of include file directories. Finally,
  451. 'intent' indicates what this object file is going
  452. to be used for.
  453. obj2lib - function that produces build file lines to build a
  454. static library file ("libfoo.a" in Unix terms) from
  455. object files.
  456. called like this:
  457. obj2lib(lib => "PATH/TO/libfile",
  458. objs => [ "PATH/TO/objectfile", ... ]);
  459. 'lib' has the intended library file name *without*
  460. extension, obj2lib is expected to add that. 'objs'
  461. has the list of object files (also *without*
  462. extension) to build this library.
  463. libobj2shlib - function that produces build file lines to build a
  464. shareable object library file ("libfoo.so" in Unix
  465. terms) from the corresponding static library file
  466. or object files.
  467. called like this:
  468. libobj2shlib(shlib => "PATH/TO/shlibfile",
  469. lib => "PATH/TO/libfile",
  470. objs => [ "PATH/TO/objectfile", ... ],
  471. deps => [ "PATH/TO/otherlibfile", ... ],
  472. ordinals => [ "word", "/PATH/TO/ordfile" ]);
  473. 'lib' has the intended library file name *without*
  474. extension, libobj2shlib is expected to add that.
  475. 'shlib' has the corresponding shared library name
  476. *without* extension. 'deps' has the list of other
  477. libraries (also *without* extension) this library
  478. needs to be linked with. 'objs' has the list of
  479. object files (also *without* extension) to build
  480. this library. 'ordinals' MAY be present, and when
  481. it is, its value is an array where the word is
  482. "crypto" or "ssl" and the file is one of the ordinal
  483. files util/libeay.num or util/ssleay.num in the
  484. source directory.
  485. This function has a choice; it can use the
  486. corresponding static library as input to make the
  487. shared library, or the list of object files.
  488. obj2dso - function that produces build file lines to build a
  489. dynamic shared object file from object files.
  490. called like this:
  491. obj2dso(lib => "PATH/TO/libfile",
  492. objs => [ "PATH/TO/objectfile", ... ],
  493. deps => [ "PATH/TO/otherlibfile",
  494. ... ]);
  495. This is almost the same as libobj2shlib, but the
  496. intent is to build a shareable library that can be
  497. loaded in runtime (a "plugin"...). The differences
  498. are subtle, one of the most visible ones is that the
  499. resulting shareable library is produced from object
  500. files only.
  501. obj2bin - function that produces build file lines to build an
  502. executable file from object files.
  503. called like this:
  504. obj2bin(bin => "PATH/TO/binfile",
  505. objs => [ "PATH/TO/objectfile", ... ],
  506. deps => [ "PATH/TO/libfile", ... ]);
  507. 'bin' has the intended executable file name
  508. *without* extension, obj2bin is expected to add
  509. that. 'objs' has the list of object files (also
  510. *without* extension) to build this library. 'deps'
  511. has the list of library files (also *without*
  512. extension) that the programs needs to be linked
  513. with.
  514. in2script - function that produces build file lines to build a
  515. script file from some input.
  516. called like this:
  517. in2script(script => "PATH/TO/scriptfile",
  518. sources => [ "PATH/TO/infile", ... ]);
  519. 'script' has the intended script file name.
  520. 'sources' has the list of source files to build the
  521. resulting script from.
  522. In all cases, file file paths are relative to the build tree top, and
  523. the build file actions run with the build tree top as current working
  524. directory.
  525. Make sure to end the section with these functions with a string that
  526. you thing is appropriate for the resulting build file. If nothing
  527. else, end it like this:
  528. ""; # Make sure no lingering values end up in the Makefile
  529. -}