summaryrefslogtreecommitdiffstats
path: root/Configurations/unix-Makefile.tmpl
AgeCommit message (Collapse)Author
2021-04-23Don't remove $(TARFILE) when cleaningRichard Levitte
This file is outside the source tree, so we have no business removing it. This is especially concerning if that was the tarball the user had to create the source tree. Fixes #14981 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14985) (cherry picked from commit f58f7ec9397de7b752aa547e2677933559a657db)
2021-03-04[1.1.1] Fix `make update` for out-of-tree buildsRichard Levitte
Fixes #11940 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/14388)
2020-03-29fix generated Makefile for Windows builds made on *nix (1.1.1d)Viktor Szakats
The fix consists of putting all destination directories between double-quotes to make the default (and any custom) prefixes containing spaces to work when doing 'make install'. Also enable CI test with x86 mingw cross-build. [extended tests] Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/11434)
2019-10-31Fix find/rm command in Unix clean recipeTanzinul Islam
The `./pyca-cryptography/.travis/downstream.d` subdirectory that causes the `rm` command to fail (albeit harmlessly, but with a warning from `make` nonetheless). >rm -f `find . -name '*.d' \! -name '.*' -print` >rm: cannot remove './pyca-cryptography/.travis/downstream.d': Is a directory >make: [Makefile:1910: clean] Error 1 (ignored) Exclude directories from being matched by the `find` commands. CLA: trivial Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10264) (cherry picked from commit 38b71bd4704ee1746e862f5a7a4e170fd84a5eb0)
2019-08-12Configurations/unit-Makefile.tmpl: Don't clean away dotted filesRichard Levitte
A local 'make clean' did some sweeping removals of files execpt for the .git directory. This is a little too sweeping, as other dotted files might be cleaned away if they happen to match the pattern that's searched for. An example is a symlink .dir-locals.el that would keep disappearing if you build in the source tree and do a make clean... So we change this to leave all dotted files alone. Our builds do not produce such files anyway, so this is a harmless (or rather, less harmful) change. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9573) (cherry picked from commit 853094dbe15a49b334f3488fc99a557abf021c09)
2019-07-25Fix default installation paths on mingwRichard Levitte
Mingw config targets assumed that resulting programs and libraries are installed in a Unix-like environment and the default installation prefix was therefore set to '/usr/local'. However, mingw programs are installed in a Windows environment, and the installation directories should therefore have Windows defaults, i.e. the same kind of defaults as the VC config targets. A difficulty is, however, that a "cross compiled" build can't figure out the system defaults from environment the same way it's done when building "natively", so we have to fall back to hard coded defaults in that case. Tests can still be performed when cross compiled on a non-Windows platform, since all tests only depend on the source and build directory, and otherwise relies on normal local paths. CVE-2019-1552 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9400)
2019-05-28Configurations/unix-Makefile.tmpl: not -v for rmRichard Levitte
Not all Unixen know the -v option Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/9012) (cherry picked from commit 3b8033f3f593ac06aaea5d050960366001ef99f0)
2019-02-27Ensure configured module specific and application specific defines are usedRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8220) (cherry picked from commit 2fce15b58b2502a614529707eb45b6e5cac4eb15)
2019-02-13Windows/Cygwin dlls need the executable bit setMichael Haubenwallner
CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8226) (cherry picked from commit fa63e45262971b9c2a6aeb33db8c52a5a84fc8b5)
2018-11-24Make sure to run util/mktar.sh from the source directoryRichard Levitte
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/7696) (cherry picked from commit b741f153b2f24139d7210b1b0c9caf561f4900e8)
2018-11-23Remove all 'make dist' artifactsRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7692) (cherry picked from commit 8d9535ec3e317641b8e551973c8cfe2ee1c89296)
2018-11-19Unix build: for mingw and cygwin, create the right location for DLLsRichard Levitte
Mingw and Cygwin builds install the DLLs in the application directory, not the library directory, so ensure that one is created for them when installing the DLLs. Fixes #7653 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7654) (cherry picked from commit 9694ebf753e571a55935a63b4df8016e7bd3248d)
2018-11-09Have install targets depend on more precise build targetsRichard Levitte
We only had the main 'install' target depend on 'all'. This changes the dependencies so targets like install_dev, install_runtime_libs, install_engines and install_programs depend on build targets that are correspond to them more specifically. This increases the parallel possibilities. Fixes #7466 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7583) (cherry picked from commit e8d01a608705e4320082a11a3870aa7e19c7290f)
2018-11-09Allow parallel installRichard Levitte
When trying 'make -j{n} install', you may occasionally run into trouble because to sub-targets (install_dev and install_runtime) try to install the same shared libraries. That makes parallel install difficult. This is solved by dividing install_runtime into two parts, one for libraries and one for programs, and have install_dev depend on install_runtime_libs instead of installing the shared runtime libraries itself. Fixes #7466 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7583) (cherry picked from commit c1123d9f7efb005a109aeccaba82c40bf9bd4c1d)
2018-10-31Configuration: when building the dirinfo structure, include shared_sourcesRichard Levitte
This makes sure that any resulting directory target in the build files also depend on object files meant for shared libraries. As a side effect, we move the production of the dirinfo structure from common.tmpl to Configure, to make it easier to check the result. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7452) (cherry picked from commit b6e660754c2e799cffe4906269fcace0e07c73bc)
2018-10-21build file templates: have targets for all shared library namesRichard Levitte
We only had targets for the "simple" shared library names (libfoo.so and not libfoo.so.x.y on Unix, import library libfoo.lib but not libfoo.dll on Windows). This has created some confusion why it wasn't possible to rebuild the less "simple" name directly (just as an example, someone who mistook the import library on Windows for a static library, removed the DLL and then found it was difficult to rebuild directly), so we change the target to include all possible names. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7451) (cherry picked from commit d8cac50b023be249cdaba054f43acecf17025ce4)
2018-10-17Build file templates: look at *all* definesRichard Levitte
When looking at configured macro definitions, we must look at both what comes from the config target AND what comes from user configuration. Fixes #7396 Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/7402) (cherry picked from commit 92ebf6c4c21ff4b41ba1fd69af74b2039e138114)
2018-08-24Configurations/unix-Makefile.tmpl: address find portability issue.Andy Polyakov
-path is non-portable extension, fortunately it's possible to express .git subdirectory exclusion with -prune. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7004)
2018-07-23Make sure the 'tsget' script is called 'tsget.pl' everywhereRichard Levitte
The result is that we don't have to produce different names on different platforms, and we won't have confusion on Windows depending on if the script was built with mingw or with MSVC. Partial fix for #3254 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6764)
2018-07-09Keep supporting the env / make variable PERLRichard Levitte
OpenSSL 1.1.0 supports the use of this environment variable for passing to the build files. For the sake of backward compatibility, we keep it. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6668)
2018-06-22Configurations/unix-Makefile.tmpl: switch to "natural" AIX shared libraries.Andy Polyakov
AIX treats its shared libraries in unique manner, by placing multiple shared objects of different versions and bitnesses, into .a file. So far we have been naively linking with version-less libcrypto|ssl.so, which poses long-term maintenance problems. One could choose to link straight with libcrypto.so.X.Y [or libcrypto.X.Y.so], but it would be inconsistent with the way AIX [or Unix] does things. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6487)
2018-06-19Improve the output of `make doc-nits`Dr. Matthias St. Pierre
- Print positive feedback in the case when 'make doc-nits' finds no errors. - Other than before, keep the 'doc-nits' output file only in case of errors and remove it if it is empty. - Declare 'doc-nits' as a phony make target to facilitate rerunning 'make doc-nits' without having to remove the output file first. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6517)
2018-06-12make errors: use the new util/ck_errf.pl optionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6461)
2018-04-29Configurations/unix-Makefile.tmpl: harmonize with no-engine.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6106)
2018-04-19Don't distribute team internal config targetsRichard Levitte
Configurations/90-team.conf isn't for public consumption, so we rename it to 90-team.norelease.conf and make sure 'make dist' and 'make tar' don't include it in the tarball. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5836)
2018-04-15Remove mandatory generated files tooBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5951)
2018-04-15Fix cygwin make dependenciesBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5951)
2018-04-12Configurations/*.tmpl: refine build_all_generated.Andy Polyakov
Purpose of build_all_generated is to execute all the rules that require perl, so that one can copy the tree to system with compiler but without perl. This commit removes last dependencies on perl. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5929)
2018-04-11Configuration: Simplify generating list of generated files in build file ↵Richard Levitte
templates Computing the value of the GENERATED variable in the build file templates is somewhat overcomplicated, and because of possible duplication errors, changes are potentially error prone. Looking more closely at how this list is determined, it can be observed that the exact list of files to check is consistently available in all the values found in the %unified_info tables 'depends', 'sources' and 'shared_sources', and all that's needed is to filter those values so only those present as keys in the 'generate' table are left. This computation is also common for all build files, so due to its apparent complexity, we move it to common0.tmpl, with the result left in a global variable (@generated), to be consumed by all build file templates. common0.tmpl is included among the files to process when creating build files, but unlike common.tmpl, it comes first of all. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5930)
2018-04-08Fix the build_all_generated rule to include generated .map, .def and .opt filesBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5900)
2018-04-04Don't use CPP in Configurations/unix-Makefile.tmplRichard Levitte
We started using $(CPP) instead of $(CC) -E, with the assumption that CPP would be predefined. This is, however, not always true, and rather depends on the 'make' implementation. Furthermore, on platforms where CPP=cpp or something else other than '$(CC) -E', there's a risk that it won't understand machine specific flags that we pass to it. So it turns out that trying to use $(CPP) was a mistake, and we therefore revert that use back to using $(CC) -E directly. Fixes #5867 Note: this affects config targets that use Alpha, ARM, IA64, MIPS, s390x or SPARC assembler modules. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5872)
2018-03-22Configurations/unix-Makefile.tmpl: fix inconsistencies with resource filesRichard Levitte
.res files weren't treated consistently. They weren't included at all in the build of a shared library, and were named inconsistently; .res sometimes, and .res.o otherwise. Now we standardise it to .res.o, which is the recommended way with GNU tools. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5730)
2018-03-16Move all dependency post-processing to util/add-depends.plRichard Levitte
In the end, it's more efficient to only have one perl instance (that loads configdata.pm) dealing with dependency files than running one (that still loads configdata.pm) for each such file. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5631)
2018-03-15Streamline dependency generationRichard Levitte
It seems that only gcc -MMD produces dependency files that are "sane" for our needs. For all other methods, some post processing is needed: - 'makedepend' (Unix) insists that object files are located in the same spot as the source file. - 'cl /Zs /showIncludes' (Visual C) has "Note: including file: " where we'd like to see the object. - 'CC/DECC' (VMS) insists that the object file is located in the current directory, i.e. it strips away all directory information. So far, we've managed this (except for the VMS case) with individual uncommented perl command lines directly in the build file template. We're now collecting these diverse hacks into one perl script that takes an argument to tell what kind of input to expect and that massages whatever it gets on STDIN and outputs the result on STDOUT. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5591)
2018-03-13Refactor the 'depend' targetRichard Levitte
With the help of the perl script util/add-depends.pl, which takes all its information directly from configdata.pm, the dependency adding procedure can be streamlined for all support platforms. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5606)
2018-03-10Configurations/unix-Makefile.tmpl: overhaul assembler make rules.Andy Polyakov
So far assembly modules were built as .pl->.S->.s followed by .s->.o. This posed a problem in build_all_generated rule if it was executed on another computer. So we change rule sequence to .pl->.S and then .S->.s->.o. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5573)
2018-03-09Display the library building flagsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5560)
2018-03-08Reduce travis-ci log outputMichael Richardson
Travis-ci log output is huge and overflows internal travis-ci view, which makes it hard to find errors. Redirect some output to a file and dump it only if it fails. Remove "v" option from tar that builds and extracts the srcdist. While running the tests manually, some non-POSIX (bashisms) with == vs = came to light. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5555)
2018-03-08Configure et al: get rid of last traces of plib_lflags / PLIB_LDFLAGSRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-08Make "make variables" config attributes for overridable flagsRichard Levitte
With the support of "make variables" comes the possibility for the user to override them. However, we need to make a difference between defaults that we use (and that should be overridable by the user) and flags that are crucial for building OpenSSL (should not be overridable). Typically, overridable flags are those setting optimization levels, warnings levels, that kind of thing, while non-overridable flags are, for example, macros that indicate aspects of how the config target should be treated, such as L_ENDIAN and B_ENDIAN. We do that differentiation by allowing upper case attributes in the config targets, named exactly like the "make variables" we support, and reserving the lower case attributes for non-overridable project flags. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-07Configurations/unix-Makefile.tmpl: remove assignment of AS and ASFLAGSRichard Levitte
We have never used these variables with the Unix Makefile, and there's no reason for us to change this, so to avoid confusion, we remove them. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5545)
2018-02-27Make some perl scripts output to stdoutRich Salz
And only generate one output "file" at a time for objects.pl Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5432)
2018-02-26Make it possible to give --libdir an absolute pathRichard Levitte
With this, we introduce the make variable 'libdir', which differs from 'LIBDIR' not only in casing, but also by being the absolute path to the library installation directory. This variable is intentionally compatible with the GNU coding standards. When --libdir is given an absolute path, it is considered as a value according to GNU coding standards, and the variables LIBDIR and libdir will be this: LIBDIR= libdir=/absolute/path When --libdir is given a relative path (just the name of the desired library directory), or not given at all, it is considered as a "traditional" OpenSSL value, and the variables LIBDIR and libdir will be this: LIBDIR=relativepath libdir=$(INSTALLTOP)/$(LIBDIR) Fixes #5398 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5446)
2018-02-22Build files: when using $(CPP), use the C flags alongside the CPP flagsRichard Levitte
The reason for this is that some of the C flags affect built in macros that we may depend on. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5436)
2018-02-22Build file templates: be less verbose when reconfiguringRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5247)
2018-02-22Unix Makefile: Rework the assignment of CXX and ASRichard Levitte
If the configured value is the empty string, give them a sane default. Otherwise, give them the configured value prefix with $(CROSS_COMPILE) Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5247)
2018-02-22Refactor the ranlib attributeRichard Levitte
It was inconsistent to see this specific command have '$(CROSS_COMPILE)' in its value when no other command did. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5247)
2018-02-14Harmonize the make variables across all known platforms familiesRichard Levitte
The make variables LIB_CFLAGS, DSO_CFLAGS and so on were used in addition to CFLAGS and so on. This works without problem on Unix and Windows, where options with different purposes (such as -D and -I) can appear anywhere on the command line and get accumulated as they come. This is not necessarely so on VMS. For example, macros must all be collected and given through one /DEFINE, and the same goes for inclusion directories (/INCLUDE). So, to harmonize all platforms, we repurpose make variables starting with LIB_, DSO_ and BIN_ to be all encompassing variables that collects the corresponding values from CFLAGS, CPPFLAGS, DEFINES, INCLUDES and so on together with possible config target values specific for libraries DSOs and programs, and use them instead of the general ones everywhere. This will, for example, allow VMS to use the exact same generators for generated files that go through cpp as all other platforms, something that has been impossible to do safely before now. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5357)
2018-02-14Build files: parametrize cppRichard Levitte
Instead of having the knowledge of the exact flags to run the C preprocessor only and have it output on standard output in the deeper recesses of the build file template, make it a config parameter, or rely on build CPP in value ('$(CC) -E' on Unix). Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/5356)
2018-02-09Configuration: move the handling of zlib_include to config filesRichard Levitte
It was a bit absurd to have this being specially handled in the build file templates, especially that we have the 'includes' attribute. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5296)