aboutsummaryrefslogtreecommitdiffstats
path: root/Configurations/common.tmpl
Commit message (Collapse)AuthorAgeFilesLines
* Build file templates: additional information to build file template functionsRichard Levitte2016-09-091-6/+23
| | | | | | | | | | Send a bit information to the build file template functions. For src2obj(), the additional option 'product' holds the name of the final file that the object file will go into. Additionally, the diverse functions will get the option 'installed', with a value that evaluates true if the final product is to be installed, otherwise false. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Configure: Make it possible to generate mandatory header filesRichard Levitte2016-06-141-0/+3
| | | | | | | | | | 'DEPEND[]=file.h' becomes a special way to say that 'file.h' must be generated before anything else is built. It's likely that a number of source files depend on these header files, this provides a simple way to make sure they are always generated even it the dependency data hasn't been added to the build file yet. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix the directory target generationRichard Levitte2016-06-061-2/+14
| | | | | | | | | | | | | | The directories for the final products were never registered, it was plain luck that intermediary files were in the same place and registered the directory anyway. Also, scripts are generated directly from source (binaries go through intermadiary object files), so we need to explicitely make sure to avoid registering the source directory unless it's an in source build. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add developer targets for each subdirectory we have something to build inRichard Levitte2016-06-041-2/+44
| | | | | | | | | | | | | | | | | | | Previous build scheme allowed building just the stuff in one subdirectory, like this: make -C crypto/aes Because the unified only has a top-level Makefile, this is not possible with it. This change adds a replacement where each directory we have something to build in becomes a target in its own right, allowing building something like this: make crypto/aes The exception is the directory test, because we already have such a target. Reviewed-by: Stephen Henson <steve@openssl.org>
* Communicate Configure generated header files to build filesRichard Levitte2016-05-251-0/+2
| | | | | | | | | Add Configure generated header files to $unified_info{generate}. This makes sure the build files will pick them up with the rest for the GENERATED macro, and thereby make sure they get cleaned away by 'make clean' Reviewed-by: Rich Salz <rsalz@openssl.org>
* Build system: add include directories and dependencies for generatorsRichard Levitte2016-04-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of generating a file like this: GENERATE[foo.S]=mkfoo.pl arg1 arg2 the 'mkfoo.pl' generator itself might need to include other files, such as perl modules within our source tree. We can reuse already existing syntax for it, like this: INCLUDE[mkfoo.pl]=module/path or: DEPEND[mkfoo.pl]=modules/mymodule.pm This change implements the support for such constructs, and for the DEPEND statement, for any value that indicates a perl module (.pm file), it will automatically infer an INCLUDE statement for its directory, just like it does for C header files, so you won't have do write this: DEPEND[mkfoo.pl]=modules/mymodule.pm INCLUDE[mkfoo.pl]=modules Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Perl: foreach (@list) { code } is betterRichard Levitte2016-04-061-4/+4
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Perl cleanup: don't create lists unnecessarilyRichard Levitte2016-04-061-10/+18
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Make it possible to specify source files that will only be used for shared libsRichard Levitte2016-03-301-3/+7
| | | | | | | | | | There are rare cases when an object file will only be used when building a shared library. To enable this, we introduce SHARED_SOURCE: SHARED_SOURCE[libfoo]=dllmain.c Reviewed-by: Andy Polyakov <appro@openssl.org>
* Pass down inclusion directories to source file generatorsRichard Levitte2016-03-101-2/+9
| | | | | | | | | | The source file generators sometimes use $(CC) to post-process generated source, and getting the inclusion directories may be necessary at times, so we pass them down. RT#4406 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Unified - Add the build.info command OVERRIDE, to avoid build file clashesRichard Levitte2016-03-071-0/+3
| | | | | | | | | | | | | | | | Should it be needed because the recipes within a RAW section might clash with those generated by Configure, it's possible to tell it not to generate them with the use of OVERRIDES, for example: SOURCE[libfoo]=foo.c bar.c OVERRIDES=bar.o BEGINRAW[Makefile(unix)] bar.o: bar.c $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $< ENDRAW[Makefile(unix)] Reviewed-by: Rich Salz <rsalz@openssl.org>
* Unified - Add the build.info command GENERATE, to generate source filesRichard Levitte2016-03-071-1/+21
| | | | | | | | | | | | | | | | 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>
* Keep a cache of files that already have a recipe, in common.tmplRichard Levitte2016-02-271-1/+12
| | | | | | We don't want recipes for the same files generated more than once Reviewed-by: Rich Salz <rsalz@openssl.org>
* Clean away $config{no_shared} since we have $disabled{shared}Richard Levitte2016-02-221-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Always build library object files with shared library cflagsRichard Levitte2016-02-201-2/+4
| | | | | | | | | | | | | | | | This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
* Small rename fest in unified, obj2dynlib -> obj2dsoRichard Levitte2016-02-191-5/+5
| | | | | | | Since we're using the acronym DSO everywhere else and that's a common name for that kind of object, we might as well do so here as well. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Don't treat .d (depend) files separately from object filesRichard Levitte2016-02-181-5/+0
| | | | | | | | | | | | | .d (.MMS in the VMS world) files with just dependencies are built from exactly the same conditions as the object files. Therefore, the rules for them can be built at the same time as the rules for the corresponding object files. This removes the requirement for a src2dep function in the build file templates, and for common.tmpl to call it. In the end, the existence of depend files is entirely up to the build file. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Unified build - fix make dependRichard Levitte2016-02-121-0/+1
| | | | | | | | | | | | There was a catch 22, where 'make depend' directly after configuring in an otherwise pristine build tree would fail because buildinf.h didn't exist yet. This change has the depend building targets depend on the same other targets as the object file building targets, so the generation of buildinf.h and similar files would kick in during 'make depend'. Reviewed-by: Rich Salz <rsalz@openssl.org>
* unified build scheme: add and document the "unified" driving engineRichard Levitte2016-02-091-0/+118
common.tmpl will be used together with the template build file, and is the engine that connects the information gathered from all the build.info files with making the build file itself. This file expects there to be a template section in the build file template that defines a number perl functions designed to return strings with appropriate lines for the build system at hand. The exact functions, what they can expect as arguments and what output they're expected to produce is documented in Configurations/README. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>