summaryrefslogtreecommitdiffstats
path: root/Configurations/unix-Makefile.tmpl
AgeCommit message (Collapse)Author
2016-04-19Build: Make 'test' depend on 'tests'Richard Levitte
Because we have a directory 'test', the target 'test' may be confusing to make. However, if we make it depend on 'tests', which doesn't exist, make should never fail to run the actions. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-14Fix installation for no-stdio and no-autoalginitRichard Levitte
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-14Fix no-stdio and no-autoalginitMatt Caswell
no-stdio does not work with the apps. Since the tests also need the apps it doesn't support that either. Therefore we disable building of both. no-autoalginit is not compatible with the apps because it requires explicit loading of the algorithms, and the apps don't do that. Therefore we disable building the apps for this option. Similarly the tests depend on the apps so we also disable the tests. Finally the whole point about no-autoalginit is to avoid excessive executable sizes when doing static linking. Therefore we disable "shared" if this option is selected. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13Fix the handling of --with-zlib-includeRichard Levitte
The handling was Unix centric, already in Configure. Change that to just collect the value and let the build file templates figure out what to do with it. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-04-07Remove redundant symlinkEmilia Kasper
We used to symlink generate_ssl_tests.pl to the build directory. Now that the build scripts look for sources in both directories, this is no longer necessary (see commit fbd361eaf84446e8d6860ab2b7ecf9d04585f2ef). Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-05New SSL test frameworkEmilia Kasper
Currently, SSL tests are configured via command-line switches to ssltest.c. This results in a lot of duplication between ssltest.c and apps, and a complex setup. ssltest.c is also simply old and needs maintenance. Instead, we already have a way to configure SSL servers and clients, so we leverage that. SSL tests can now be configured from a configuration file. Test servers and clients are configured using the standard ssl_conf module. Additional test settings are configured via a test configuration. Moreover, since the CONF language involves unnecessary boilerplate, the test conf itself is generated from a shorter Perl syntax. The generated testcase files are checked in to the repo to make it easier to verify that the intended test cases are in fact run; and to simplify debugging failures. To demonstrate the approach, min/max protocol tests are converted to the new format. This change also fixes MinProtocol and MaxProtocol handling. It was previously requested that an SSL_CTX have both the server and client flags set for these commands; this clearly can never work. Guide to this PR: - test/ssl_test.c - test framework - test/ssl_test_ctx.* - test configuration structure - test/handshake_helper.* - new SSL test handshaking code - test/ssl-tests/ - test configurations - test/generate_ssl_tests.pl - script for generating CONF-style test configurations from perl inputs Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-04Makefile et al template: only modify static library with new object filesRichard Levitte
Previously, we updated the static libraries (libcrypto.a on Unix, libcrypto.lib on Windows) with all the object files, regardless of if they were rebuilt or not. With this change, we only update them with the object files were rebuilt. NOTE: this does not apply on VMS, as the expansion of $? may be too large for a command line. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-04-02make depend: Check that find returned a non-empty string rather than an emptyRichard Levitte
The logic to find out of there are any .d files newer than Makefile is sound. Checking the result was less so. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-02Correcting typo that causes make install failCoty Sutherland
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-01Make the use of perl more consistentRichard Levitte
- In Configure, register the perl interpreter used to run Configure, so that's the one being used throughout instead of something else that Configure happens to find. This is helpful for using a perl version that's not necessarely first in $PATH: /opt/perl/5.22.1/bin/perl ./Configure - Make apps/tsget a generated file, just like apps/CA.pl, so the perl interpreter registered by Configure becomes the hashbang path instead of a hardcoded /usr/bin/perl Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-30'make test' depends of having util/shlib-wrap.sh symlinked in build dirRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-21In for loop values, introduce a dummy to protect against empty listRichard Levitte
In constructions such as 'for x in $(MAKEVAR); do ...', there's the possibility that $(MAKEVAR) is en empty value. Some shells don't like that, so introduce a dummy value that gets discarded: for x in dummy $(MAKEVAR); do if [ "$$x" = "dummy" ]; then continue; fi Closes RT#4459 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-20Have makedepend output to stdout and redirect itRichard Levitte
This gives us better control of what files are produced. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-19If the asm file to be compiled isn't generated, leave the ext aloneRichard Levitte
Closes RT#4447 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-19Don't let 'generate' target depend on generated files, act directly insteadRichard Levitte
One of the 'generate' targets depended on $(SRCDIR)/apps/progs.h, which depended on... nothing. This meant it never got regenerated once it existed, regardless of need. Of course, we could have it depend on all the files checked to generate it, but they also depend on progs.h, so we'd end up getting cricular dependencies, which makes make unhappy. Furthermore, and this applies for the other generated files, having them as targets means that they may be regenerated on the fly in some cases, and since they get written to the source tree, this isn't such a good idea if that tree is read-only (which is a possible situation in an out-of-tree build). So, we move all the actions to the 'generate' targets themselves, thus making sure they get regenerated in a controlled manner and regardless of dependencies. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-19Revert "Generate apps/progs.h on the fly"Viktor Dukhovni
This reverts commit 04e2a527379ad12ca512aef4e838f94af22d7f79. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Replace sed command with perlRichard Levitte
Some implementations of sed require a newline before an ending '}'. The easier method is to replace that sed command with the corresponding perl command. Closes RT#4448 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Clear the exit code from 'find' in 'make depend'Richard Levitte
Depending on what has been built so far, all .d files may not be present and 'find' will exit with non-zero exit code. This isn't a bother for us but may break make, so clear the exit code with an added 'exit 0'. Closes RT#4444 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Shut find up about files not foundRichard Levitte
Some of the files in $(DEPS) might not exist. We don't need to know. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Use the dependencies received in generatesrc()Richard Levitte
generatesrc() did already receive dependency information, but never used it, and never really needed to... until now. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19Generate apps/progs.h on the flyRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-18Better 'make depend' mechanismRichard Levitte
Instead of relying on the '-nt' test operator, which doesn't exist everywhere, use find's '-newer' to find out if any of the known .d files is newer than Makefile. Closes RT#4444 Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-17Don't define OPENSSL_ENGINES in test recipes, do it in Makefiles insteadRichard Levitte
In most builds, we can assume that engines live in the build tree subdirectory "engines". This was hard coded into the tests that use the engine ossltest. However, that hard coding is tedious, it would need to be done in every test recipe, and it's an incorrect assumption in some cases. This change has us play it safe and let the build files tell the testing framework where the engines are. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-16unix-Makefile template: use $(PERL) everywhereRichard Levitte
There was one spot that had hard-coded 'perl' Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-16We should use $SRCDIR in MakefilesMatt Caswell
Normally we always refer to source files relative to $SRCDIR in Makefiles. However the reference to unix-Makefile.tmpl was using a fully expanded absolute path. This can cause problems for Mingw. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-15Make the perl dependency post-processor into just one lineRichard Levitte
Make doesn't always treat multiline quoted strings as nicely as one would wish. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-15Not all shells understand !Richard Levitte
In unix-Makefile.tmpl, this construction has been used a few times if ! something; then ... It seems, though, that some shells do not understand !, so these need to be changed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13Collect the names of generated files and clean them away at target clean:Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13Use single quotes rather than double quotes when neededRichard Levitte
When passing down values to Makefile.shared, do so with single quotes as much as possible to avoid having the shell create a mess of quotes. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-13Harmonize Unix Makefile template with Windows ditoRichard Levitte
The variable SHARED_CFLAGS and SHARD_LDFLAGS were used in the Unix template because they normally contain options used when building "shared". The Windows template, on the other hand, uses LIB_CFLAGS, to express the intended use of those flags rather than their content. The Windows template still used SHARED_LDFLAGS, which seems inconsistent. To harmonize the two, any SHARED_CFLAGS gets renamed to LIB_CFLAGS and SHARED_LDFLAGS to LIB_LDFLAGS. That makes the intent consistent along with BIN_{C,LD}FLAGS and DSO_{C,LD}FLAGS. Finally, make sure to pass down $(LIB_CFLAGS) or $(DSO_CFLAGS) along with $(CFLAGS) when using Makefile.shared. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-12Avoid sed for dependency post-processingRichard Levitte
It turns out that different sed implementations treat -i differently to cause issues. make it simpler by avoiding it entirely and give perl the trust to be consistent enough. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Some sed implementations are not greedy enough, use perl insteadRichard Levitte
The issue is demonstrated as follows: On Linux: $ echo ': foo.h /usr/include/stddef.h bar.h' | sed -e 's/ \/\(\\.\|[^ ]\)*//g' : foo.h bar.h On MacOS X: $ echo ': foo.h /usr/include/stddef.h bar.h' | sed -e 's/ \/\(\\.\|[^ ]\)*//g' : foo.husr/include/stddef.h bar.h Perl is more consistent: On Linux: $ echo ': foo.h /usr/include/stddef.h bar.h' | perl -pe 's/ \/(\\.|[^ ])*//g;' : foo.h bar.h On MacOS X: $ echo ': foo.h /usr/include/stddef.h bar.h' | perl -pe 's/ \/(\\.|[^ ])*//g;' : foo.h bar.h Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-11Configurations/unix-Makefile.tmpl: don't leave empty .s files behind.Andy Polyakov
If pre-processor failed, an empty .s file could be left behind, which could get successfully compiled if one simply re-ran make and cause linking failures. Not anymore. Remove even intermediate .S in case of pre-processor failure. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11Harmonise the two methods to generate dependency filesRichard Levitte
One of them didn't clean away .d.tmp files properly. The other would overwrite the .d files unconditionally, thereby causing a possibly unnecessary dependency rebuild, which touches the date of Makefile, which causes a possibly unnecessary rebuild of buildinf.h and everything that depends on that. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-10In the recipe using "makedepend", make sure the object file extension is thereRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-03-10Pass down inclusion directories to source file generatorsRichard Levitte
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>
2016-03-09Adapt unix Makefile template to 'no-makedepend'Richard Levitte
This change is a bit more complex, as it involves several recipe variants. Also, remove the $(CROSS_COMPILE) prefix for the makedepend program. When we use the program "makedepend", this doesn't serve anything, and when we use the compiler, this value isn't even used. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Redo the Unix source code generatorRichard Levitte
For assembler, we want the final target to be foo.s (lowercase s). However, the build.info may have lines like this (note upper case S): GENERATE[foo.S]=foo.pl This indicates that foo.s (lowercase s) is still to be produced, but that producing it will take an extra step via $(CC) -E. Therefore, the following variants (simplified for display) can be generated: GENERATE[foo.S]=foo.pl => foo.s: foo.pl $(PERL) $foo.pl $@.S; \ $(CC) $(CFLAGS) -E -P $@.S > $@ && \ rm -f $@.S GENERATE[foo.s]=foo.pl => foo.s: foo.pl $(PERL) $foo.pl $@ GENERATE[foo.S]=foo.m4 => foo.s: foo.m4 m4 -B 8192 $foo.m4 > $@.S; \ $(CC) $(CFLAGS) -E -P $@.S > $@ && \ rm -f $@.S GENERATE[foo.s]=foo.m4 => foo.s: foo.m4 m4 -B 8192 $foo.m4 > $@ Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-08Fix configurations such as 'dist' and tar buildingRichard Levitte
For config targets such as 'dist', which doesn't have a BASE template, we still need to have a default build scheme. Additionally, the unified Makefile template's target 'tar' wasn't quite as flexible as the unixmake one. Finally, .travis-create-release.sh can be somewhat simplified now that it builds with the unified build scheme. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07Unified - Adapt the Unix and VMS templates to support GENERATERichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-04Correction, $disabled{shared} rather than $config{no_shared}Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-03Remove overzealous echoingRichard Levitte
This construct in a Makefile is a bit overzealous: @echo FOO @FOO Cleaned up. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-02Don't copy from %target to %config so much, see %config as a complementRichard Levitte
We copied $target{cflags}, $target{defines} and a few more to %config, just to add to the entries. Avoid doing so, and let the build templates deal with combining the two. There are a few cases where we still fiddle with %target, but that's acceptable. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02Minimize copied config settingsRichard Levitte
$target{lflags} and $target{plib_flag} were copied to %config for no good reason. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-01Unified - have configdata.pm depend on a few more thingsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-28Make generation of dependency files more efficient when possibleRichard Levitte
When building with GNU C, clang or VMS C, it's more efficient to generate dependency file and object file in one call rather than two. Have the dependency output in a temporary file and compare it with the previous one if available to see if replacement is waranted, thereby avoiding unnecessary reconstruction of Makefile / descrip.mms. Github issue #750 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-27Remove some old files.Rich Salz
I read the PROBLEMS, and they're outdated; nothing I'd put in the online FAQ, for example. Test-builds work without using these files. Had to remove the rehash.time stuff from Makefile.in Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-26Public API for Certificate TransparencyRob Percival
Reviewed-by: Ben Laurie <ben@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-25Make it possible to build even if dependency files can't be generatedRichard Levitte
If the local system doesn't have GNU C or clang, and not even makedepend, the build will stop because the call of 'makedepend' fails. This changes so the build won't stop because of such failure. The result will be empty .d files, and that's ok. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-22Clean away $config{no_shared} since we have $disabled{shared}Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>