chiark / gitweb /
build system: test-example: Fix out-of-tree builds
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 19 Oct 2019 22:03:19 +0000 (23:03 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2019 18:16:15 +0000 (19:16 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test-example/Makefile.in

index 5869983f19420f6982e9978fb60732a229518c63..c7ecbd17b6391ec2426f243a72ddf009004d56e3 100644 (file)
@@ -1,12 +1,17 @@
 TARGETS=sites.conf inside.key outside.key
 
+VPATH:=@srcdir@
+include ../common.make
+srcdir:=@srcdir@
+topdir:=@top_srcdir@
+
 all: $(TARGETS)
 
 %.key: %.key.b64
        base64 -d <$< >$@.new && mv -f $@.new $@
 
-sites.conf: ../make-secnet-sites sites Makefile
-       ../make-secnet-sites sites sites.conf
+sites.conf: $(topdir)/make-secnet-sites $(srcdir)/sites Makefile
+       $(topdir)/make-secnet-sites $(srcdir)/sites sites.conf
 
 clean:
        rm -f *~ ./#*# *.new $(TARGETS)