.PHONY: all clean realclean distclean dist install
PACKAGE:=secnet
-VERSION=0.4.5
+VERSION=0.5.0
VPATH:=@srcdir@
srcdir:=@srcdir@
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
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-stest
+ $(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
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
- $(MAKE) -C stest clean
+
+$(addprefix clean-,$(TESTDIRS)): clean-%:
+ $(MAKE) -C $* clean
realclean: clean
$(RM) -f *~ Makefile config.h *.d \
# 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