chiark / gitweb /
Build system: Makefile: support DESTDIR.
[secnet.git] / Makefile.in
index f68022abbc8e4bd5c3a5bdc8115c6b75e3fc688e..16b099af2e1109142c5d41faee4d40c662cb47af 100644 (file)
@@ -18,7 +18,7 @@
 .PHONY:        all clean realclean distclean dist install
 
 PACKAGE:=secnet
-VERSION:=0.3.4
+VERSION:=0.4.0~beta1
 
 @SET_MAKE@
 
@@ -32,10 +32,10 @@ INSTALL:=@INSTALL@
 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
 INSTALL_SCRIPT:=@INSTALL_SCRIPT@
 
-prefix:=@prefix@
+prefix:=$(DESTDIR)@prefix@
 exec_prefix:=@exec_prefix@
 sbindir:=@sbindir@
-sysconfdir:=@sysconfdir@
+sysconfdir:=$(DESTDIR)@sysconfdir@
 datarootdir:=@datarootdir@
 transform:=@program_transform_name@
 mandir:=@mandir@
@@ -75,7 +75,7 @@ endif
 STALE_PYTHON_FILES=    $(foreach e, py pyc, \
                        $(foreach p, /usr /usr/local, \
                        $(foreach l, ipaddr, \
-                       $p/share/secnet/$l.$e \
+                       $(DESTDIR)$p/share/secnet/$l.$e \
                        )))
 
 %.c:   %.y
@@ -86,7 +86,7 @@ STALE_PYTHON_FILES=   $(foreach e, py pyc, \
 %.tab.c %.tab.h:       %.y
        bison -d -o $@ $<
 
-%.o: %.c
+%.o: %.c conffile.yy.h
        $(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
 
 all:   $(TARGETS) check
@@ -191,8 +191,8 @@ install-force:
        $(MAKE) install
 
 clean:
-       $(RM) -f *.o *.yy.c *.tab.[ch] $(TARGETS) core version.c
-       $(RM) -f *.d *~ eax-*-test.confirm eax-*-test
+       $(RM) -f *.o *.yy.[ch] *.tab.[ch] $(TARGETS) core version.c
+       $(RM) -f *.d *.pyc *~ eax-*-test.confirm eax-*-test
 
 realclean:     clean
        $(RM) -f *~ Makefile config.h  *.d \