]> git.draconx.ca Git - dxcommon.git/commitdiff
Fix testsuite VPATH builds.
authorNick Bowler <nbowler@draconx.ca>
Thu, 30 Apr 2015 04:41:19 +0000 (00:41 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 28 Jun 2017 23:24:24 +0000 (19:24 -0400)
Need to add -I$(srcdir) to all autom4te invocations, otherwise it will
try to find input files only in builddir.

snippet/autotest.mk

index 293a85860976c8a8fd4f97d58c3427733f2acd22..738e321851496ac33b23bc4c05d2af73cdfd4f73 100644 (file)
@@ -53,14 +53,17 @@ DX_AUTOTEST_ERROR = @:; { \
          printf 'Autoconf package: <https://gnu.org/s/autoconf/>\n'; \
        } 1>&2; false
 
+DX_ATFLAGS = -I$(srcdir) $(ATFLAGS)
+
 testsuite: testsuite.at package.m4
 if !HAVE_AUTOTEST
        $(DX_AUTOTEST_ERROR)
 endif
-       $(AM_V_GEN) $(AUTOTEST) $(ATFLAGS) -p m4_include -o $@.tmp testsuite.at
+       $(AM_V_GEN) $(AUTOTEST) $(DX_ATFLAGS) -p m4_include -o $@.tmp \
+         testsuite.at
        $(AM_V_at) :; { \
-         $(AUTOTEST) $(ATFLAGS) -t m4_include:'$@: $$1' testsuite.at; \
-         $(AUTOTEST) $(ATFLAGS) -t m4_include:'$$1:' testsuite.at; \
+         $(AUTOTEST) $(DX_ATFLAGS) -t m4_include:'$@: $$1' testsuite.at; \
+         $(AUTOTEST) $(DX_ATFLAGS) -t m4_include:'$$1:' testsuite.at; \
        } >$(DEPDIR)/$(@F).P
        $(AM_V_at) mv -f $@.tmp $@
 
@@ -68,7 +71,7 @@ testsuite.deps: testsuite
 if !HAVE_AUTOTEST
        $(DX_AUTOTEST_ERROR)
 endif
-       $(AM_V_GEN) $(AUTOTEST) $(ATFLAGS) -t m4_include:'$$1' -o $@.tmp \
+       $(AM_V_GEN) $(AUTOTEST) $(DX_ATFLAGS) -t m4_include:'$$1' -o $@.tmp \
          testsuite.at
        $(AM_V_at) mv -f $@.tmp $@