build-file templates, adapted for the platform they are meant for (see
sections on %unified_info and build-file templates further down).
-The variables PROGRAMS, LIBS, ENGINES and SCRIPTS are used to declare
+The variables PROGRAMS, LIBS, MODULES and SCRIPTS are used to declare
end products. There are variants for them with '_NO_INST' as suffix
(PROGRAM_NO_INST etc) to specify end products that shouldn't get
installed.
-The variables SOURCE, DEPEND and INCLUDE are indexed by a produced
-file, and their values are the source used to produce that particular
-produced file, extra dependencies, and include directories needed.
+The variables SOURCE, DEPEND, INCLUDE and DEFINE are indexed by a
+produced file, and their values are the source used to produce that
+particular produced file, extra dependencies, include directories
+needed, or C macros to be defined.
All their values in all the build.info throughout the source tree are
-collected together and form a set of programs, libraries, engines and
+collected together and form a set of programs, libraries, modules and
scripts to be produced, source files, dependencies, etc etc etc.
Let's have a pretend example, a very limited contraption of OpenSSL,
composed of the program 'apps/openssl', the libraries 'libssl' and
-'libcrypto', an engine 'engines/ossltest' and their sources and
+'libcrypto', an module 'engines/ossltest' and their sources and
dependencies.
# build.info
LIBS=../libcrypto
SOURCE[../libcrypto]=aes.c evp.c cversion.c
DEPEND[cversion.o]=buildinf.h
-
+
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)"
DEPEND[buildinf.h]=../Makefile
DEPEND[../util/mkbuildinf.pl]=../util/Foo.pm
This build.info file informs us that 'libcrypto' is built from a few
source files, 'crypto/aes.c', 'crypto/evp.c' and 'crypto/cversion.c'.
It also shows us that building the object file inferred from
-'crypto/cversion.c' depends on 'crypto/buildinf.h'. Finally, it
+'crypto/cversion.c' depends on 'crypto/buildinf.h'. Finally, it
also shows the possibility to declare how some files are generated
using some script, in this case a perl script, and how such scripts
can be declared to depend on other files, in this case a perl module.
'DEPEND[cversion.o]' mentions an object file. DEPEND indexes is the
only location where it's valid to mention them
-Lines in 'BEGINRAW'..'ENDRAW' sections must always mention files as
-seen from the top directory, no exception.
-
# ssl/build.info
LIBS=../libssl
SOURCE[../libssl]=tls.c
library 'libssl' is built from the source file 'ssl/tls.c'.
# engines/build.info
- ENGINES=dasync
+ MODULES=dasync
SOURCE[dasync]=e_dasync.c
DEPEND[dasync]=../libcrypto
INCLUDE[dasync]=../include
- ENGINES_NO_INST=ossltest
+ MODULES_NO_INST=ossltest
SOURCE[ossltest]=e_ossltest.c
DEPEND[ossltest]=../libcrypto.a
INCLUDE[ossltest]=../include
-This is the build.info file in 'engines/', telling us that two engines
+This is the build.info file in 'engines/', telling us that two modules
called 'engines/dasync' and 'engines/ossltest' shall be built, that
dasync's source is 'engines/e_dasync.c' and ossltest's source is
'engines/e_ossltest.c' and that the include directory 'include/' may
-be used when building anything that will be part of these engines.
-Also, both engines depend on the library 'libcrypto' to function
+be used when building anything that will be part of these modules.
+Also, both modules depend on the library 'libcrypto' to function
properly. ossltest is explicitly linked with the static variant of
the library 'libcrypto'. Finally, only dasync is being installed, as
ossltest is only for internal testing.
SOURCE[libssl]=ssl/tls.c
INCLUDE[libssl]=include
DEPEND[libssl]=libcrypto
-
+
PROGRAMS=apps/openssl
SOURCE[apps/openssl]=apps/openssl.c
INCLUDE[apps/openssl]=. include
DEPEND[apps/openssl]=libssl
- ENGINES=engines/dasync
+ MODULES=engines/dasync
SOURCE[engines/dasync]=engines/e_dasync.c
DEPEND[engines/dasync]=libcrypto
INCLUDE[engines/dasync]=include
- ENGINES_NO_INST=engines/ossltest
+ MODULES_NO_INST=engines/ossltest
SOURCE[engines/ossltest]=engines/e_ossltest.c
DEPEND[engines/ossltest]=libcrypto.a
INCLUDE[engines/ossltest]=include
-
+
GENERATE[crypto/buildinf.h]=util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)"
DEPEND[crypto/buildinf.h]=Makefile
DEPEND[util/mkbuildinf.pl]=util/Foo.pm
PROGRAMS may be used to declare programs only.
-ENGINES may be used to declare engines only.
+MODULES may be used to declare modules only.
The indexes for SOURCE must only be end product files, such as
-libraries, programs or engines. The values of SOURCE variables must
+libraries, programs or modules. The values of SOURCE variables must
only be source files (possibly generated).
INCLUDE and DEPEND shows a relationship between different files
pairs. These are directly inferred from the DEPEND
variables in build.info files.
- engines => a list of engines. These are directly inferred from
- the ENGINES variable in build.info files.
+ modules => a list of modules. These are directly inferred from
+ the MODULES variable in build.info files.
generate => a hash table containing 'file' => [ 'generator' ... ]
pairs. These are directly inferred from the GENERATE
variables in build.info files.
install => a hash table containing 'type' => [ 'file' ... ] pairs.
- The types are 'programs', 'libraries', 'engines' and
+ The types are 'programs', 'libraries', 'modules' and
'scripts', and the array of files list the files of
that type that should be installed.
programs => a list of programs. These are directly inferred from
the PROGRAMS variable in build.info files.
- rawlines => a list of build-file lines. These are a direct copy of
- the BEGINRAW..ENDRAW lines in build.info files. Note:
- only the BEGINRAW..ENDRAW section for the current
- platform are copied, the rest are ignored.
-
scripts => a list of scripts. There are directly inferred from
the SCRIPTS variable in build.info files.
"util/Foo.pm",
],
},
- "engines" =>
+ "modules" =>
[
"engines/dasync",
"engines/ossltest",
}
"install" =>
{
- "engines" =>
+ "modules" =>
[
"engines/dasync",
],
[
"apps/openssl",
],
- "rawlines" =>
- [
- ],
"sources" =>
{
"apps/openssl" =>
'sources' has the list of source files to build the
resulting script from.
-Along with the build-file templates is the driving engine
+Along with the build-file templates is the driving template
Configurations/common.tmpl, which looks through all the information in
%unified_info and generates all the rulesets to build libraries,
programs and all intermediate files, using the rule generating