.PHONY: all clean realclean distclean dist install
PACKAGE:=secnet
-VERSION=0.4.5
+VERSION=0.5.0
VPATH:=@srcdir@
-
+srcdir:=@srcdir@
include common.make
INSTALL:=@INSTALL@
hackypar.o
# version.o is handled specially below and in the link rule for secnet.
+PYMODULES := ipaddrset.py argparseactionnoyes.py
+
TEST_OBJECTS:=eax-aes-test.o eax-serpent-test.o eax-serpentbe-test.o \
eax-test.o aes.o
cd ${srcdir} && autoconf
# autoheader might not change config.h.in, so touch a stamp file.
-${srcdir}/config.h.in: stamp-h.in
-${srcdir}/stamp-h.in: configure.in
+${srcdir}/config.h.in: config.stamp.in
+${srcdir}/config.stamp.in: configure.in
cd ${srcdir} && autoheader
- echo timestamp > ${srcdir}/stamp-h.in
+ echo timestamp > ${srcdir}/config.stamp.in
-config.h: stamp-h
-stamp-h: config.h.in config.status
+config.h: config.stamp
+config.stamp: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
secnet: $(wildcard .git/packed-refs)
endif
-check: eax-aes-test.confirm eax-serpent-test.confirm \
+TESTDIRS=stest mtest
+
+FAST_CHECKS= eax-aes-test.confirm eax-serpent-test.confirm \
eax-serpentbe-test.confirm check-ipaddrset \
- msgcode-test.confirm check-test
+ $(addprefix check-,$(TESTDIRS))
+
+CHECKS += $(FAST_CHECKS)
+CHECKS += msgcode-test.confirm
+
+check: $(CHECKS)
+
+recheck:
+ rm -f $(FAST_CHECKS)
+ rm -rf $(addsuffix /d-*, $(TESTDIRS))
+ $(MAKE) check
version.c: Makefile
echo "#include \"secnet.h\"" >$@.new
$(srcdir)/ipaddrset-test.py >ipaddrset-test.new
diff -u $(srcdir)/ipaddrset-test.expected ipaddrset-test.new
-check-test: secnet test-example/sites.conf
- $(MAKE) -C test check
+check-stest: secnet test-example/sites.conf
+ $(MAKE) -C stest check
+
+check-mtest: make-secnet-sites $(PYMODULES)
+ $(MAKE) -C mtest check
test-example/sites.conf:
$(MAKE) -C test-example
$$ok
$(INSTALL_PROGRAM) secnet $(sbindir)/`echo secnet|sed '$(transform)'`
$(INSTALL_PROGRAM) ${srcdir}/make-secnet-sites $(sbindir)/`echo make-secnet-sites|sed '$(transform)'`
- $(INSTALL_DATA) ${srcdir}/ipaddrset.py $(prefix)/share/secnet/ipaddrset.py
+ set -e; for m in $(PYMODULES); do \
+ $(INSTALL_DATA) ${srcdir}/$$m $(prefix)/share/secnet/$$m; \
+ done
$(INSTALL_SCRIPT) ${srcdir}/polypath-interface-monitor-linux \
$(datarootdir)/secnet/.
$(INSTALL_DATA) ${srcdir}/secnet.8 $(mandir)/man8/secnet.8
rm -f $(STALE_PYTHON_FILES)
$(MAKE) install
-clean:
+clean: $(addprefix clean-,$(TESTDIRS))
$(RM) -f *.o *.yy.[ch] *.tab.[ch] $(TARGETS) core version.c
$(RM) -f *.d *.pyc *~ eax-*-test.confirm eax-*-test
+ $(RM) -rf __pycache__
$(RM) -f msgcode-test.confirm msgcode-test
+$(addprefix clean-,$(TESTDIRS)): clean-%:
+ $(MAKE) -C $* clean
+
realclean: clean
$(RM) -f *~ Makefile config.h *.d \
config.log config.status config.cache \
- stamp-h Makefile.bak
+ config.stamp Makefile.bak
distclean: realclean
# finalise debian/changelog (removing ~ from version) and commit.
#
# 4. Build source and binaries:
-# dgit -wgf sbuild -A -c stretch
+# dgit -wgf sbuild -A -c stretch -j8
#
# 5. dpkg -i on zealot just to check
# dpkg -i ~ian/things/Fvpn/bpd/secnet_${VERSION}_amd64.deb