summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-05-22 17:54:06 +0200
committerRichard Levitte <levitte@openssl.org>2015-05-23 11:17:35 +0200
commit1b8403889b52be15a8de87054ad4605d79fafb08 (patch)
tree51ba07ae18df6314745f6e8a3be765399c08c14a /engines
parente261cf5a2e3c12e9c6221a83a077c5523b85b979 (diff)
Fix the update target and remove duplicate file updates
We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 0f539dc1a2f45580435c39dada44dd276e79cb88) Conflicts: Makefile.org apps/Makefile test/Makefile crypto/cmac/Makefile crypto/srp/Makefile
Diffstat (limited to 'engines')
-rw-r--r--engines/Makefile12
-rw-r--r--engines/ccgost/Makefile13
2 files changed, 14 insertions, 11 deletions
diff --git a/engines/Makefile b/engines/Makefile
index 2fa9534401..a5b6e0fcc3 100644
--- a/engines/Makefile
+++ b/engines/Makefile
@@ -146,12 +146,14 @@ lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
@target=lint; $(RECURSIVE_MAKE)
-depend:
- @if [ -z "$(THIS)" ]; then \
- $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
- fi
- @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
+update: local_depend
+ @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
+
+depend: local_depend
+ @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
+local_depend:
+ @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
diff --git a/engines/ccgost/Makefile b/engines/ccgost/Makefile
index dadb5230ec..248dd09ffc 100644
--- a/engines/ccgost/Makefile
+++ b/engines/ccgost/Makefile
@@ -66,12 +66,13 @@ links:
tests:
-depend:
- @if [ -z "$(THIS)" ]; then \
- $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
- else \
- $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC); \
- fi
+update: local_depend
+ @[ -z "$(THIS)" ] && $(MAKE) -f $(TOP)/Makefile reflect THIS=$@
+
+depend: local_depend
+ @[ -z "$(THIS)" ] && $(MAKE) -f $(TOP)/Makefile reflect THIS=$@
+local_depend:
+ @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
files: