From db188e3da39a1fbeb299ddd4d0376605a1ee2d08 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 14 Nov 2019 00:40:37 +0000 Subject: [PATCH] build system: Convert test-example to subdirmk Signed-off-by: Ian Jackson --- Subdir.sd.mk | 3 --- common.make.in | 1 + configure | 5 +++++ configure.ac | 2 +- test-example/Subdir.sd.mk | 21 +++++++++------------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Subdir.sd.mk b/Subdir.sd.mk index 2841cb1..dfa03b6 100644 --- a/Subdir.sd.mk +++ b/Subdir.sd.mk @@ -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: diff --git a/common.make.in b/common.make.in index 1e3139e..d1f2fe0 100644 --- a/common.make.in +++ b/common.make.in @@ -20,6 +20,7 @@ @SET_MAKE@ topbuilddir:=@abs_top_builddir@ +src:=@top_srcdir@ SHELL:=/bin/sh CC:=@CC@ diff --git a/configure b/configure index 67aabce..328236d 100755 --- 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" ;; diff --git a/configure.ac b/configure.ac index 2764671..0cdf9cf 100644 --- a/configure.ac +++ b/configure.ac @@ -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 $) diff --git a/test-example/Subdir.sd.mk b/test-example/Subdir.sd.mk index c7ecbd1..66cdaf8 100644 --- a/test-example/Subdir.sd.mk +++ b/test-example/Subdir.sd.mk @@ -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 -- 2.30.2