Fix the update target and remove duplicate file updates
[openssl.git] / ssl / Makefile
index ad2f99f3679daa9aadff18513e9ffeaa7f950d95..d1fc049dd8f0127faf497c9b227a3752703dd2ee 100644 (file)
@@ -71,12 +71,13 @@ tests:
 lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
-depend:
-       @if [ -z "$(THIS)" ]; then \
-           $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
-       else \
-           $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC); \
-       fi
+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
+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