summaryrefslogtreecommitdiffstats
path: root/Configurations/unix-Makefile.tmpl
AgeCommit message (Collapse)Author
2023-12-08Make sure that the test / tests build target run 'run_tests' lastRichard Levitte
Fixes #22943 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22948)
2023-10-18Update unix Makefile template to handle paths with spacesJames Muir
Fixes #4668 (on unix-like platforms) Testing: rm -rf "$HOME/tmp/beforespace afterspace" ./Configure -Werror --strict-warnings --prefix="$HOME/tmp/beforespace afterspace" make -j6 update make -j6 make install make test Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22386)
2023-05-22fips.module.sources: Add missing cpuid and related .c sources for other ↵Tomas Mraz
architectures Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/20949) (cherry picked from commit c509c040223aebd2a681fb64b60177c3c21f76d1)
2022-11-04Configurations/*.tmpl: overhaul assembler make rules.Richard Levitte
NOTE: Not Configurations/unix-Makefile.tmpl, as that was done 4 years ago, in commit a23f03166e0ec49ac09b3671e7ab4ba4fa57d42a. So far assembly modules were intended to be built as .pl->.S->.{asmext} followed by .{asmext}->.o. This posed a problem in build_all_generated rule if it was executed on another computer, and also turned out to be buggy, as .S was also translated to .{asmext} on Windows and VMS. Both issues are fixed by changing the rule sequence to .pl->.S and then .S->.s->.o, with the added benefit that the Windows and VMS build file templates are more in sync with unix-Makefile.tmpl and slightly simpler. Fixes #19594 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19598) (cherry picked from commit b8d3cf0954737a9665e3b2bff25bc689a5114010)
2022-06-12Include the modules directory in openssl.pcRichard Levitte
Affected file: Configurations/unix-Makefile.tmpl Fixes #18516 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18520)
2022-05-25Remove include/openssl/configuration.h from mandatory dependenciesRichard Levitte
Since this file is generated by configdata.pm, there's no need to include it among the mandatory dependencies (which end up in the `GENERATE_MANDATORY` Makefile variable). In fact, it shouldn't be there any more, as that would also cause it to be removed by `make clean`. To compensate, we add an explicit removal of that file in the `distclean` target on all platform families. Fixes #18396 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18398) (cherry picked from commit ef8040bce02758de86fc55412ee4ac9102f9ffab)
2022-05-13mkdef.pl: Add cmd-line flag to differentiate shared libs and DSO.Daniel Fiala
Fixes openssl#16984. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18284) (cherry picked from commit e5f831a065df1d6e4640ef389f8594a5f10c9c8e)
2022-03-04Rework dependencies between config files and build filesRichard Levitte
Before PR #15310, which reworked how build files (Makefile, ...) were generated, everything was done when configuring, so configdata.pm could depend on build file templates and we'd get away with it. However, since building configdata.pm is now independent of the build file templates, that dependency is unnecessary, and would lead to surprises of the build file template is updated, with an unexpected full reconfiguration as a result, when all that's needed is to run configdata.pm with no flags to get the build file re-generated. This change is therefore a completion of what was forgotten in #15310. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17756) (cherry picked from commit 468d15179d6b0d0c2f5674bcbef66743925f2133)
2022-02-03Fix copyrightsTodd Short
Add copyright to files that were missing it. Update license from OpenSSL to Apache as needed. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17606) (cherry picked from commit 9d987de3aabe54e65a55649a61953966f33b070b)
2022-01-24`make clean` should clean up fips provider shared object.Todd Short
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17556)
2021-09-13Fix the build file templates where uplink mattersRichard Levitte
We changed the manner in which a build needing applink is detected, but forgot to change the installation targets accordingly. Fixes #16570 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16577)
2021-09-10install_fips: Create the OPENSSLDIR as it might not existTomas Mraz
Fixes #16564 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16569) (cherry picked from commit 85efdaab4d068f7de354b0a18f70f1737941dc7f)
2021-09-09OpenSSL::Ordinals::set_version() should only be given the short versionRichard Levitte
This function tried to shave off the pre-release and build metadata text from the the version number it gets, but didn't do that quite right. Since this isn't even a documented behaviour, the easier, and arguably more correct path is for that function not to try to shave off anything, and for the callers to feed it the short version number, "{MAJOR}.{MINOR}.{PATCH}", nothing more. The build file templates are adjusted accordingly. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16556) (cherry picked from commit 435981cbadad2c58c35bacd30ca5d8b4c9bea72f)
2021-07-23Makefile: Avoid changing LIBDIR based on whether it already existsjenda1
unix-Makefile.tmpl checks if the target LIBDIR exists on the build machine or not and based on the result modify the final LIBDIR. This should be avoided, build results should not depend on the build machine root filesystem layout. It makes the build results unstable. The fix simply removes the dir existence test from the unix-Makefile.tmpl. Fixes: openssl#16121 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16122)
2021-07-10Configurations/unix-Makefile.tmpl: use platform->sharedlib() as fallbackRichard Levitte
If platform->sharedlib_simple() and platform->sharedlib_import() return undefined, try platform->sharedlib() as a fallback before platform->staticlib(). Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16023)
2021-06-29Ensure ordinals are created during release processMatt Caswell
We introduce a new makefile target "make release-update" that forces ordinal file renumbering, and also does the fips checksum updates. We then call that from the release script. Fixes #15806 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15901)
2021-06-26Only the fips module dependencies are relevant for fips.module.sourcesTomas Mraz
Fixes #15639 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15903)
2021-06-18Make util/wrap.pl work better on VMSRichard Levitte
Perl's system() on VMS needs to have the command line properly fixed up, even with arguments passed in list form. We arrange that by having util/wrap.pl use the same command line fixups as OpenSSL::Test. As a consequence, util/wrap.pl needs to be generated, to easily pick up data from configdata.pm. This also removes yet another file copying hack from the build file templates. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15791)
2021-06-16Build file templates: Fix in2script dependenciesRichard Levitte
The in2script functions generates the build file rules for generating scripts from .in files. A dependency on configdata.pm is needed, since it's being used for this. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15792)
2021-06-08Fix AIX FIPS DEP.Shane Lontis
The entry point needs the option 'binitfini', but it was not being added since the perl code to detect the match did not work. The entry point for AIX is no longer static - so a wrapper has been added to call the static version. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15636)
2021-05-29Rearrange the check of providers/fips.so dependenciesRichard Levitte
The mechanism had special cases to guess when something was generated from a .in file. It's better, though, to use the knowledge in configdata.pm, especially when the generated file is in a different location than its source. Cleanups are added, and we change the use of sed to a use of perl when cleaning up paths with 'something/../' in them, since perl has more powerful tools for this sort of thing. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-29Make providers/fips.module.sources.new depend on configdata.pmRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15514)
2021-05-27generate_fips_sources: properly include providers/common/der/*.inTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15481)
2021-05-26Build file templates: rework FIPS module installationRichard Levitte
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-26Build file templates: rework how general dependencies are computedRichard Levitte
For some types of targets, we pretty much know what kinds of files all the dependencies are. For some, however, we can't assume anything, and are faced with dependencies in platform agnostic form. We need to find those in diverse places in %unified_info, and deduce from there how they should be converted to a platform specific form. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-26Rework how providers/fipsmodule.cnf is producedRichard Levitte
First of all, we have concluded that we can calculate the integrity checksum with a simple perl script. Second, having the production of providers/fipsmodule.cnf as a dependency for run_tests wasn't quite right. What we really want is to generate it as soon as a new providers/fips.so is produced. That required a small bit of fiddling with how diverse dependencies are made. Fixes #15166 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15436)
2021-05-25Do not try to install image directories with no imagesTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/15433)
2021-05-25checksum: include header files in the checksumming outputPauli
Fixes #15133 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15365)
2021-05-22configurations: update template makefiles to install documentation imagesPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15399)
2021-05-20Create symlinks when installing man pagesMatt Caswell
In 1.1.1 when installing the man pages we created symlinks to the base page for all functions described on the page. We need to continue doing this. Fixes #14846 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15312)
2021-05-19unix-Makefile.tmpl and ci.yml: Merge cmd-nits into doc-nitsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15329)
2021-05-19Move some OpenSSL perl utility functions to OpenSSL::UtilRichard Levitte
quotify1() and quotify_l() were in OpenSSL::Template, but should be more widely usable. configdata.pm.in's out_item() is also more widely useful and is therefore moved to OpenSSL::Util as well, and renamed to dump_data(). Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15310)
2021-05-18find-doc-nits: Make -c option (cmd-nits) independent of app build and executionDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15298)
2021-05-14Add --banner config optionRich Salz
Use it in the automated workflows. Fixes: #15247 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15248)
2021-05-13update-fips-checksums: Make the dependency on source list workTomas Mraz
Also clean the generated checksums with make clean Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15267)
2021-05-13Makefile: Simplify use of run_testsDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14901)
2021-05-13Remove the .new suffix inside the fips.checksum.newTomas Mraz
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15263)
2021-05-13Allow diff-fips-checksums in in-tree buildTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-13Add diff-fips-checksums target to compare BLDDIR and SRCDIR checksumsTomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-13Compute the FIPS checksums in $(BLDDIR) and remove it from update targetTomas Mraz
Add also update-fips-checksums to update the checksums in the $(SRCDIR) if the $(SRCDIR) and $(BLDDIR) is different. The fips-checksums and generate_fips_sources targets are always produced (regardless of enable-fips) as nothing else depends on them and they are developer targets. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15229)
2021-05-08Remove unused code from the fips moduleShane Lontis
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15167)
2021-05-04FIPS module checksums: add scripts and Makefile ruleRichard Levitte
This adds the following scripts: util/lang-compress.pl: Compress source code, which language is determined by the first argument. For the moment, we know 'perl' (perlasm source code), 'C' (C source code) and 'S' (Assembler with C preprocessor directives). This removes comments and empty lines, and compresses series of horizontal spaces to one single space in the languages where that's appropriate. util/fips-checksums.sh: Takes source file names as arguments, pushes them through util/lang-compress.pl and unifdef with FIPS_MODE defined, and calculates the checksum on the result. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8871)
2021-05-04Unix build file: Add a target to create providers/fips.module.sourcesRichard Levitte
This file will be the basis for the FIPS module checksum calculation Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8871)
2021-04-29Configure/Makefile: install the fips provider if it was configuredDr. Matthias St. Pierre
To follow the principle "what you configure is what you install", the `make install` target now includes the installation of the fips provider (`make install_fips`) if (and only if) OpenSSL was configured with fips support (`enable-fips`). The `make install_fips` target exists as well and can be used to install just the fips provider. It requires `enable-fips` and issues an error message if `no-fips` was configured. The anologue holds for the 'uninstall_fips' target. Fixes #13693 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: don't generate a fresh fipsmodule.cnf when installing itDr. Matthias St. Pierre
There is already a `providers/fipsmodule.cnf` target which is required by the tests. Instead of creating another fipsmodule.cnf, the `install_fips` target simply copies that configuration file to its final destination. This commit also restores the minimal dependencies to build the `install_fips` target immediately after configuring, which was broken after the removal of the `install_sw` dependency. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: separate install of the FIPS moduleDr. Matthias St. Pierre
Fixes #13693 Co-authored-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: correct the FIPS module configuration file pathDr. Matthias St. Pierre
According to the OpenSSL 3.0 Wiki, the file should be located at $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf next to the openssl.cnf file. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: use the correct openssl app for FIPS installationDr. Matthias St. Pierre
The `openssl` app was previously called without a path, which would generally invoke the system's copy of the openssl application. Currently, that's most likely an openssl version 1.1.1 application, which does not recognize the `fipsinstall` command and terminates with an error message. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-29Configure/Makefile: fix the `-macopt` argument of the fipsinstall commandDr. Matthias St. Pierre
The FIPS hmac key is provided as a hexadezimal string, which needs to be be prefixed with `hexkey:`, not `key:`. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13684)
2021-04-28Configuration: rework how dependency making is handledRichard Levitte
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)