chiark / gitweb /
changelog: start 0.6.8
[secnet.git] / Dir.sd.mk
index e201646270da918f3c734fc43dd06f3ebd1cea3a..7da57d08d540865579dec641022beed3efe270d5 100644 (file)
--- a/Dir.sd.mk
+++ b/Dir.sd.mk
@@ -20,7 +20,7 @@
 .PHONY:        all clean realclean distclean dist install
 
 PACKAGE:=secnet
-VERSION=0.5.1
+VERSION=0.6.7
 
 VPATH:=@srcdir@
 srcdir:=@srcdir@
@@ -50,14 +50,14 @@ TARGETS:=secnet
 
 OBJECTS:=secnet.o util.o conffile.yy.o conffile.tab.o conffile.o modules.o \
        resolver.o random.o udp.o site.o transform-cbcmac.o transform-eax.o \
-       comm-common.o polypath.o privcache.o \
+       comm-common.o polypath.o privcache.o pubkeys.o pubkeys.yy.o \
        netlink.o rsa.o dh.o serpent.o serpentbe.o \
        md5.o sha512.o tun.o slip.o sha1.o ipaddr.o log.o \
-       process.o @LIBOBJS@ \
-       hackypar.o
+       process.o osdep.o @LIBOBJS@ \
+       hackypar.o base91s/base91.o
 # version.o is handled specially below and in the link rule for secnet.
 
-PYMODULES := ipaddrset.py argparseactionnoyes.py
+PYMODULES := ipaddrset.py argparseactionnoyes.py base91.py
 
 TEST_OBJECTS:=eax-aes-test.o eax-serpent-test.o eax-serpentbe-test.o \
                eax-test.o aes.o
@@ -75,17 +75,27 @@ STALE_PYTHON_FILES= $(foreach e, py pyc, \
                        $(DESTDIR)$p/share/secnet/$l.$e \
                        )))
 
-%.c:   %.y
+%.yy.c %.yy.h: %.fl
+       flex --header=$*.yy.h -o$*.yy.c $<
 
-%.yy.c:        %.fl
-       flex --header=$*.yy.h -o$@ $<
+%.c: %.y
+# make has a builtin rule to run yacc, but we don't want that because
+# our conffile.c is handwritten, and we use conffile.yy.c for the
+# bison output.  There is no need to do likewise for flex because
+# our flex input files are end in .fl, not .l.
 
 %.tab.c %.tab.h:       %.y
        bison -d -o $@ $<
 
-%.o: %.c conffile.yy.h
+%.o: %.c
        $(CC) $(CPPFLAGS) $(ALL_CFLAGS) $(CDEPS_CFLAGS) -c $< -o $@
 
+$(OBJECTS): conffile.yy.h pubkeys.yy.h base91s/base91.h
+# ^ we can't write this as a dependency on the %.o %.c rule
+#   because (say) conffile.yy.c isn't mentioned so doesn't "ought
+#   to exist" in make's mind.  But specifying it explicitly like this
+#   works.
+
 all::  $(TARGETS)
 
 ${srcdir}/config.h.in: configure.ac
@@ -96,12 +106,11 @@ MAKEFILE_TEMPLATES += config.h.in
 CONFIG_STATUS_OUTPUTS += config.h
 
 # Manual dependencies section
-conffile.yy.c: conffile.fl conffile.tab.c
-conffile.yy.h: conffile.yy.c
-conffile.tab.c:        conffile.y
+conffile.yy.c: conffile.tab.c
+%.tab.c: %.y
 # End of manual dependencies section
 
-conffile.yy.o: ALL_CFLAGS += -Wno-sign-compare
+%.yy.o: ALL_CFLAGS += -Wno-sign-compare -Wno-unused-function
 
 secnet:        $(OBJECTS)
        $(MAKE) -f main.mk version.o # *.o $(filter-out %.o, $^)
@@ -125,10 +134,9 @@ TESTDIRS=stest mtest
 &TARGETS_fullcheck += $(&TARGETS_check)
 &TARGETS_fullcheck += msgcode-test.confirm
 
-recheck:
-       rm -f $(&TARGETS_check)
-       rm -rf $(addsuffix /d-*, $(TESTDIRS))
-       $(MAKE) -f main.mk check
+RECHECK_RM += $(&TARGETS_check)
+
+recheck: check
 
 .PHONY: FORCE
 version.c: FORCE
@@ -163,6 +171,11 @@ ipaddrset.confirm: ipaddrset-test.py ipaddrset.py ipaddrset-test.expected
        diff -u $(srcdir)/ipaddrset-test.expected ipaddrset-test.new
        touch $@
 
+&CLEAN += & pubkeys.fl
+
+pubkeys.fl: ${srcdir}/pubkeys.fl.pl
+       ${srcdir}/pubkeys.fl.pl >$@.tmp && mv -f $@.tmp $@
+
 .PRECIOUS: eax-%-test
 
 installdirs:
@@ -241,6 +254,9 @@ include subdirmk/regen.mk
 #       git-push origin v${VERSION//\~/_} v${VERSION//\~/_}~0:master
 #       dcmd rsync -v ../bpd/secnet_${VERSION}_multi.changes chiark:/home/ianmdlvl/public-html/secnet/download/
 #
+#  8a. Upload to Debian:
+#       dgit push-source
+#
 #  9. Sort out html.  On chiark as user secnet:
 #       cd ~secnet/public-html/release/
 #       mkdir $VERSION