diff options
author | Richard Levitte <levitte@openssl.org> | 2022-02-23 11:00:39 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-03-04 12:32:54 +0100 |
commit | 468d15179d6b0d0c2f5674bcbef66743925f2133 (patch) | |
tree | 78320cf739e14c78f2a6416d30c5389326c4c1f3 /Configurations/unix-Makefile.tmpl | |
parent | 2507903eb7c4e3ca4bc1a00074c16b409abc028e (diff) |
Rework dependencies between config files and build files
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)
Diffstat (limited to 'Configurations/unix-Makefile.tmpl')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 9f9ad2a912..35f03d69ec 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -599,7 +599,7 @@ distclean: clean # We check if any depfile is newer than Makefile and decide to # concatenate only if that is true. -depend: +depend: Makefile @: {- output_off() if $disabled{makedepend}; "" -} @$(PERL) $(SRCDIR)/util/add-depends.pl "{- $makedep_scheme -}" @: {- output_on() if $disabled{makedepend}; "" -} @@ -1371,13 +1371,13 @@ tar: link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/apps/openssl.cnf -$(BLDDIR)/util/opensslwrap.sh: configdata.pm +$(BLDDIR)/util/opensslwrap.sh: Makefile @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \ mkdir -p "$(BLDDIR)/util"; \ ln -sf "../$(SRCDIR)/util/`basename "$@"`" "$(BLDDIR)/util"; \ fi -$(BLDDIR)/apps/openssl.cnf: configdata.pm +$(BLDDIR)/apps/openssl.cnf: Makefile @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \ mkdir -p "$(BLDDIR)/apps"; \ ln -sf "../$(SRCDIR)/apps/`basename "$@"`" "$(BLDDIR)/apps"; \ @@ -1387,7 +1387,8 @@ FORCE: # Building targets ################################################### -libcrypto.pc libssl.pc openssl.pc: configdata.pm $(LIBS) {- join(" ",map { platform->sharedlib_simple($_) // platform->sharedlib_import($_) // platform->sharedlib($_) // () } @{$unified_info{libraries}}) -} +libcrypto.pc libssl.pc openssl.pc: Makefile $(LIBS) {- join(" ",map { platform->sharedlib_simple($_) // platform->sharedlib_import($_) // platform->sharedlib($_) // () } @{$unified_info{libraries}}) -} + libcrypto.pc: @ ( echo 'prefix=$(INSTALLTOP)'; \ echo 'exec_prefix=$${prefix}'; \ @@ -1439,10 +1440,22 @@ openssl.pc: echo 'Version: '$(VERSION); \ echo 'Requires: libssl libcrypto' ) > openssl.pc +Makefile: configdata.pm \ + {- join(" \\\n" . ' ' x 10, + fill_lines(" ", $COLUMNS - 10, + @{$config{build_file_templates}})) -} + @echo "Detected changed: $?" + $(PERL) configdata.pm + @echo "**************************************************" + @echo "*** ***" + @echo "*** Please run the same make command again ***" + @echo "*** ***" + @echo "**************************************************" + @false + configdata.pm: $(SRCDIR)/Configure $(SRCDIR)/config \ {- join(" \\\n" . ' ' x 15, fill_lines(" ", $COLUMNS - 15, - @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}})) -} @echo "Detected changed: $?" |