aboutsummaryrefslogtreecommitdiff
path: root/Configurations/README
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-07 14:37:00 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-07 18:25:56 +0100
commitae4c7450754ea13265edd69e6ff74d87c89401cd (patch)
tree8acb4c1b1120b58109e4b66d60b2cccf9750b6d7 /Configurations/README
parent667867cced0013c1cfd8d7a9efa43b8f2cebc942 (diff)
downloadopenssl-ae4c7450754ea13265edd69e6ff74d87c89401cd.zip
openssl-ae4c7450754ea13265edd69e6ff74d87c89401cd.tar.gz
openssl-ae4c7450754ea13265edd69e6ff74d87c89401cd.tar.bz2
Unified - Add the build.info command GENERATE, to generate source files
In some cases, one might want to generate some source files from others, that's done as follows: GENERATE[foo.s]=asm/something.pl $(CFLAGS) GENERATE[bar.s]=asm/bar.S The value of each GENERATE line is a command line or part of it. Configure places no rules on the command line, except the the first item muct be the generator file. It is, however, entirely up to the build file template to define exactly how those command lines should be handled, how the output is captured and so on. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations/README')
-rw-r--r--Configurations/README38
1 files changed, 36 insertions, 2 deletions
diff --git a/Configurations/README b/Configurations/README
index afc6004..40875a3 100644
--- a/Configurations/README
+++ b/Configurations/README
@@ -363,8 +363,22 @@ include paths the build of their source files should use:
INCLUDE[foo]=include
-It's possible to have raw build file lines, between BEGINRAW and
-ENDRAW lines as follows:
+In some cases, one might want to generate some source files from
+others, that's done as follows:
+
+ GENERATE[foo.s]=asm/something.pl $(CFLAGS)
+ GENERATE[bar.s]=asm/bar.S
+
+The value of each GENERATE line is a command line or part of it.
+Configure places no rules on the command line, except the the first
+item muct be the generator file. It is, however, entirely up to the
+build file template to define exactly how those command lines should
+be handled, how the output is captured and so on.
+
+NOTE: GENERATE lines are limited to one command only per GENERATE.
+
+As a last resort, it's possible to have raw build file lines, between
+BEGINRAW and ENDRAW lines as follows:
BEGINRAW[Makefile(unix)]
haha.h: {- $builddir -}/Makefile
@@ -461,6 +475,26 @@ The build-file template is expected to define at least the following
perl functions in a perl code fragment enclosed with "{-" and "-}".
They are all expected to return a string with the lines they produce.
+ generatesrc - function that produces build file lines to generate
+ a source file from some input.
+
+ It's called like this:
+
+ generatesrc(src => "PATH/TO/tobegenerated",
+ generator => [ "generatingfile", ... ]
+ deps => [ "dep1", ... ],
+ intent => one of "libs", "dso", "bin" );
+
+ 'src' has the name of the file to be generated.
+ 'generator' is the command or part of command to
+ generate the file, of which the first item is
+ expected to be the file to generate from.
+ generatesrc() is expected to analyse and figure out
+ exactly how to apply that file and how to capture
+ the result. 'deps' is a list of explicit
+ dependencies. 'intent' indicates what the generated
+ file is going to be used for.
+
src2obj - function that produces build file lines to build an
object file from source files and associated data.