chiark / gitweb /
build system, tests: Marginally speed some things up with -f
[secnet.git] / Subdir.sd.mk
index bb2476fbc4413aa90dbe2573c4bc4edd1a74757f..1b79c438172420117a76e040253960b5e65eaf72 100644 (file)
@@ -20,7 +20,7 @@
 .PHONY:        all clean realclean distclean dist install
 
 PACKAGE:=secnet
-VERSION=0.5.0
+VERSION=0.5.1
 
 VPATH:=@srcdir@
 srcdir:=@srcdir@
@@ -61,7 +61,7 @@ TEST_OBJECTS:=eax-aes-test.o eax-serpent-test.o eax-serpentbe-test.o \
                eax-test.o aes.o
 
 ifeq (version.o,$(MAKECMDGOALS))
-OBJECTS:=version.o
+OBJECTS:=
 TEST_OBJECTS:=
 endif
 
@@ -103,7 +103,7 @@ conffile.tab.c:     conffile.y
 conffile.yy.o: ALL_CFLAGS += -Wno-sign-compare
 
 secnet:        $(OBJECTS)
-       $(MAKE) version.o # *.o $(filter-out %.o, $^)
+       $(MAKE) -f main.mk version.o # *.o $(filter-out %.o, $^)
        $(CC) $(LDFLAGS) $(ALL_CFLAGS) -o $@ $(OBJECTS) version.o $(LDLIBS)
 # We (always) regenerate the version, but only if we regenerate the
 # binary.  (This is necessary as the version string is can depend on
@@ -112,25 +112,25 @@ secnet:   $(OBJECTS)
 ifneq (,$(wildcard .git/HEAD))
 # If we have (eg) committed, relink and thus regenerate the version
 # with the new info from git describe.
-secnet: Makefile .git/HEAD $(shell sed -n 's#^ref: #.git/#p' .git/HEAD)
+secnet: Makefile .git/HEAD $(wildcard $(shell sed -n 's#^ref: #.git/#p' .git/HEAD))
 secnet: $(wildcard .git/packed-refs)
 endif
 
 TESTDIRS=stest mtest
 
 &TARGETS_check = eax-aes-test.confirm eax-serpent-test.confirm \
-       eax-serpentbe-test.confirm ipaddrset.confirm \
-       $(addsuffix /check,$(TESTDIRS))
+       eax-serpentbe-test.confirm ipaddrset.confirm
 
 &TARGETS_fullcheck += $(&TARGETS_check)
 &TARGETS_fullcheck += msgcode-test.confirm
 
 recheck:
-       rm -f $(&TARGETS_CHECK)
+       rm -f $(&TARGETS_check)
        rm -rf $(addsuffix /d-*, $(TESTDIRS))
-       $(MAKE) check
+       $(MAKE) -f main.mk check
 
-version.c: Makefile
+.PHONY: FORCE
+version.c: FORCE
        echo "#include \"secnet.h\"" >$@.new
        @set -ex; if test -e .git && type -p git >/dev/null; then \
                v=$$(git describe --match 'v*'); v=$${v#v}; \
@@ -187,7 +187,7 @@ install: installdirs
 
 install-force:
        rm -f $(STALE_PYTHON_FILES)
-       $(MAKE) install
+       $(MAKE) -f main.mk install
 
 clean::
        $(RM) -f *.o *.yy.[ch] *.tab.[ch] $(TARGETS) core version.c
@@ -207,7 +207,7 @@ include subdirmk/regen.mk
 
 # Release checklist:
 #
-#  0. Use this checklist from Makefile.in
+#  0. Use this checklist from Subdir.sd.mk
 #
 #  1. Check that the tree has what you want
 #