chiark / gitweb /
udp: Report authbind exit status as errno value if it seems appropriate
[secnet.git] / Makefile.in
index 5ebc28d59cb451fb21e36269f741b0fc6d3a5cc5..97acf48d5c1e83ce6fbb42c6b261602c4fa658a9 100644 (file)
@@ -55,6 +55,7 @@ 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 \
        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@ \
@@ -69,6 +70,12 @@ OBJECTS:=version.o
 TEST_OBJECTS:=
 endif
 
+STALE_PYTHON_FILES=    $(foreach e, py pyc, \
+                       $(foreach p, /usr /usr/local, \
+                       $(foreach l, ipaddr, \
+                       $p/share/secnet/$l.$e \
+                       )))
+
 %.c:   %.y
 
 %.yy.c:        %.fl
@@ -161,11 +168,23 @@ installdirs:
        $(INSTALL) -d $(mandir)/man8
 
 install: installdirs
+       set -e; ok=true; for f in $(STALE_PYTHON_FILES); do \
+               if test -e $$f; then \
+                       echo >&2 "ERROR: $$f still exists "\
+                               "- try \`make install-force'"; \
+                       ok=false; \
+               fi; \
+       done; \
+       $$ok
        $(INSTALL_PROGRAM) secnet $(sbindir)/`echo secnet|sed '$(transform)'`
        $(INSTALL_PROGRAM) ${srcdir}/make-secnet-sites $(sbindir)/`echo make-secnet-sites|sed '$(transform)'`
        $(INSTALL) ${srcdir}/ipaddrset.py $(prefix)/share/secnet/ipaddrset.py
        $(INSTALL) secnet.8 $(mandir)/man8/secnet.8
 
+install-force:
+       rm -f $(STALE_PYTHON_FILES)
+       $(MAKE) install
+
 clean:
        $(RM) -f *.o *.yy.c *.tab.[ch] $(TARGETS) core version.c
        $(RM) -f *.d *~ eax-*-test.confirm eax-*-test