chiark / gitweb /
build system: Convert test-example to subdirmk
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 14 Nov 2019 00:40:37 +0000 (00:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 14 Nov 2019 00:40:37 +0000 (00:40 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Subdir.sd.mk
common.make.in
configure
configure.ac
test-example/Subdir.sd.mk

index 2841cb1ba3eb267abd64eb33359d6e2f5b7796e0..dfa03b6164be03fc6b75c279a56fbd65c1a2fd2e 100644 (file)
@@ -170,9 +170,6 @@ check-stest: secnet test-example/sites.conf
 check-mtest: make-secnet-sites $(PYMODULES)
        $(MAKE) -C mtest check
 
-test-example/sites.conf:
-       $(MAKE) -C test-example
-
 .PRECIOUS: eax-%-test
 
 installdirs:
index 1e3139e60df5521827000265a31e82c01e864e16..d1f2fe008271ad261540c60059295f0c58b5a25d 100644 (file)
@@ -20,6 +20,7 @@
 @SET_MAKE@
 
 topbuilddir:=@abs_top_builddir@
+src:=@top_srcdir@
 
 SHELL:=/bin/sh
 CC:=@CC@
index 67aabcecfb2ff562f7d3d4e8328e2a183f0c4985..328236d58cb8aae2bb6fea8810eee757944eb3ac 100755 (executable)
--- a/configure
+++ b/configure
@@ -2359,6 +2359,10 @@ ac_config_headers="$ac_config_headers config.h"
 
 
 
+  subdirmk_subdirs="$subdirmk_subdirs 'test-example/'"
+  ac_config_files="$ac_config_files test-example/Subdir.mk:test-example/Subdir.mk.tmp"
+
+
 
 
 
@@ -5434,6 +5438,7 @@ do
     "Subdir.mk") CONFIG_FILES="$CONFIG_FILES Subdir.mk:Subdir.mk.tmp" ;;
     "subdirmk/regen.mk") CONFIG_FILES="$CONFIG_FILES subdirmk/regen.mk:subdirmk/regen.mk.in" ;;
     "subdirmk/usual.mk") CONFIG_FILES="$CONFIG_FILES subdirmk/usual.mk:subdirmk/usual.mk.in" ;;
+    "test-example/Subdir.mk") CONFIG_FILES="$CONFIG_FILES test-example/Subdir.mk:test-example/Subdir.mk.tmp" ;;
     "common.make") CONFIG_FILES="$CONFIG_FILES common.make:common.make.in" ;;
     "test-common.make") CONFIG_FILES="$CONFIG_FILES test-common.make:test-common.make.in" ;;
     "stest/Makefile") CONFIG_FILES="$CONFIG_FILES stest/Makefile" ;;
index 27646718dc434fedc3fc0488d94c4cdbfff2daf7..0cdf9cf5bac0d66521d691ccdb1f573f5e9bd7ca 100644 (file)
@@ -25,7 +25,7 @@ AC_INIT(secnet,0.1.18+,secnet@chiark.greenend.org.uk)
 AC_CONFIG_SRCDIR(secnet.c)
 AC_CONFIG_HEADER(config.h)
 
-SUBDIRMK_SUBDIRS([])
+SUBDIRMK_SUBDIRS([test-example])
 
 AC_PREREQ(2.50)
 AC_REVISION($Id: configure.in,v 1.4 2002/09/09 22:05:02 steve Exp $)
index c7ecbd17b6391ec2426f243a72ddf009004d56e3..66cdaf80b13e7946b250e987a409744e23065b90 100644 (file)
@@ -1,17 +1,14 @@
-TARGETS=sites.conf inside.key outside.key
+&TARGETS += & sites.conf inside.key outside.key
 
-VPATH:=@srcdir@
-include ../common.make
-srcdir:=@srcdir@
-topdir:=@top_srcdir@
+include common.make
 
-all: $(TARGETS)
-
-%.key: %.key.b64
+&/%.key: &^/%.key.b64
        base64 -d <$< >$@.new && mv -f $@.new $@
 
-sites.conf: $(topdir)/make-secnet-sites $(srcdir)/sites Makefile
-       $(topdir)/make-secnet-sites $(srcdir)/sites sites.conf
+&sites.conf: $(src)/make-secnet-sites &^/sites Subdir.mk
+       $(src)/make-secnet-sites &^/sites &sites.conf
+
+&clean::
+       rm -f *~ ./#*# *.new
 
-clean:
-       rm -f *~ ./#*# *.new $(TARGETS)
+&:include subdirmk/clean.sd.mk