extra dummy target in case the variable is empty.
* post.in (ALL_DEP_SRCS): New variable, includes SRCS and EXTRADEPSRCS.
(.d): Depend on and use $(ALL_DEP_SRCS).
* pre.in (all-unix, all-recurse, all-postrecurse): Make each stage depend on
the previous, rather than having all-unix depend on each.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14719
dc483132-0cff-0310-8789-
dd5450dbe970
+2002-08-14 Ken Raeburn <raeburn@mit.edu>
+
+ * lib.in ($(SUBDIROBJLISTS) and .SH/.PF variants): Depend on
+ recursion. Use extra dummy target in case the variable is
+ empty.
+ * post.in (ALL_DEP_SRCS): New variable, includes SRCS and
+ EXTRADEPSRCS.
+ (.d): Depend on and use $(ALL_DEP_SRCS).
+ * pre.in (all-unix, all-recurse, all-postrecurse): Make each stage
+ depend on the previous, rather than having all-unix depend on
+ each.
+
2002-07-17 Ken Raeburn <raeburn@mit.edu>
* pre.in (DYN_DEPLIB): Removed.
SHOBJLISTS=$(STOBJLISTS:.ST=.SH)
PFOBJLISTS=$(STOBJLISTS:.ST=.PF)
+dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=.PF): all-recurse
+
lib$(LIB)$(STLIBEXT): $(STOBJLISTS)
$(RM) $@
@echo "building static $(LIB) library"
check-windows::
-.d: $(SRCS)
+ALL_DEP_SRCS= $(SRCS) $(EXTRADEPSRCS)
+
+# be sure to check ALL_DEP_SRCS against *what it would be if SRCS and
+# EXTRADEPSRCS are both empty*
+.d: $(ALL_DEP_SRCS)
if test "$(srcdir)" = "." ; then \
echo 1>&2 error: cannot build dependencies with srcdir=. ; \
echo 1>&2 "(can't distinguish generated files from source files)" ; \
exit 1 ; \
fi
- if test -n "$(SRCS)" ; then \
- $(CC) -M $(ALL_CFLAGS) $(SRCS) > .dtmp || exit 1 ; \
+ if test "$(ALL_DEP_SRCS)" != " " ; then \
+ $(CC) -M $(ALL_CFLAGS) $(ALL_DEP_SRCS) > .dtmp || exit 1 ; \
mv -f .dtmp .d ; \
else \
touch .d ; \
check:: check-$(WHAT)
-all-unix:: all-prerecurse
-all-unix:: all-recurse
+all-recurse: all-prerecurse
+all-postrecurse:: all-recurse
all-unix:: all-postrecurse
all-prerecurse::