diff --git a/Makefile.am b/Makefile.am index 1e7d0e3c..70b2359c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -162,6 +162,8 @@ MAKETESTFLAGS = .PHONY: check-regression +GMK_OUTDIR=.. + check-regression: tests/config-flags.pm @if test -f '$(top_srcdir)/tests/run_make_tests'; then \ ulimit -n 128; \ @@ -174,8 +176,8 @@ check-regression: tests/config-flags.pm rm -f tests/$$f; ln -s ../srctests/$$f tests; \ done; fi ;; \ esac; \ - echo "cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \ - cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \ + echo "cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make $(GMK_OUTDIR)/make$(EXEEXT) $(MAKETESTFLAGS)"; \ + cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '$(GMK_OUTDIR)/make$(EXEEXT)' $(MAKETESTFLAGS); \ else \ echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \ fi; \ diff --git a/maintMakefile b/maintMakefile index 70350988..aa536aaf 100644 --- a/maintMakefile +++ b/maintMakefile @@ -253,8 +253,11 @@ mk-distcheck: distdir CFGCHECK_CONFIGFLAGS = CFGCHECK_BUILDFLAGS = -CFGCHECK_MAKEFLAGS = CFLAGS='$(AM_CFLAGS)' +# We can't use our mondo warnings as these are used to compile gnulib modules +# as well, and that will fail. +CFGCHECK_MAKEFLAGS = # CFLAGS='$(AM_CFLAGS)' +# This test can no longer be run: now that we rely on gnulib we must use C99+ checkcfg.strict-c90: CFGCHECK_CONFIGFLAGS = CFLAGS='-std=c90 -pedantic' checkcfg.strict-c90: CFGCHECK_MAKEFLAGS = @@ -272,7 +275,6 @@ checkcfg.no-sync: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_OUTPUT_SYNC checkcfg.no-archives: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_ARCHIVES CONFIG_CHECKS := \ - checkcfg.strict-c90 \ checkcfg.no-jobserver \ checkcfg.no-load \ checkcfg.no-guile \ @@ -289,6 +291,18 @@ check-alt-config: $(CONFIG_CHECKS) NR_MAKE = $(MAKE) # Check builds both with build.sh and with make +build.sh_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \ + cd $(distdir)/_build \ + && OUTDIR=_bld ../build.sh $(CFGCHECK_BUILD_FLAGS) \ + && _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) check-local \ + && _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) clean + +nrmake_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \ + cd $(distdir)/_build \ + && $(NR_MAKE) $(AM_MAKEFLAGS) $(CFGCHECK_MAKEFLAGS) \ + && ./make $(AM_MAKEFLAGS) check \ + && ./make $(AM_MAKEFLAGS) clean + $(CONFIG_CHECKS): checkcfg.%: distdir @echo "Building $@ (output in checkcfg.$*.log)" exec >'checkcfg.$*.log' 2>&1; \ @@ -298,16 +312,8 @@ $(CONFIG_CHECKS): checkcfg.%: distdir && cd $(distdir)/_build \ && ../configure --srcdir=.. $(CFGCHECK_CONFIGFLAGS) \ $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) - exec >>'checkcfg.$*.log' 2>&1; set -x; \ - cd $(distdir)/_build \ - && OUTDIR=_bld ../build.sh $(CFGCHECK_BUILD_FLAGS) \ - && _bld/make $(AM_MAKEFLAGS) check-local \ - && _bld/make $(AM_MAKEFLAGS) clean - exec >>'checkcfg.$*.log' 2>&1; set -x; \ - cd $(distdir)/_build \ - && $(NR_MAKE) $(AM_MAKEFLAGS) $(CFGCHECK_MAKEFLAGS) \ - && ./make $(AM_MAKEFLAGS) check \ - && ./make $(AM_MAKEFLAGS) clean + $(build.sh_SCRIPT) + $(nrmake_SCRIPT) # Try using Basic.mk. I can't test this on POSIX systems because it is only # used for non-POSIX systems; POSIX systems can just use normal @@ -323,7 +329,7 @@ checkcfg.basicmk: checkcfg.% : distdir $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) exec >>'checkcfg.$*.log' 2>&1; set -x; \ cd $(distdir)/_build \ - && $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. CFLAGS='$(AM_CFLAGS)' \ + && $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. $(CFGCHECK_MAKEFLAGS) && ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \ && ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean exec >>'checkcfg.$*.log' 2>&1; \ @@ -332,7 +338,7 @@ checkcfg.basicmk: checkcfg.% : distdir && cd $(distdir) \ && ./configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk CFLAGS='$(AM_CFLAGS)' \ + && $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk $(CFGCHECK_MAKEFLAGS)' \ && ./make $(AM_MAKEFLAGS) -f Basic.mk check \ && ./make $(AM_MAKEFLAGS) -f Basic.mk clean @@ -436,7 +442,7 @@ $(COV_BUILD_FILE): $(filter %.c %.h,$(DISTFILES)) cd '$(distdir)'/_build \ && ../configure --srcdir=.. \ $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \ - CFLAGS='$(AM_CFLAGS)' + $(CFGCHECK_MAKEFLAGS) PATH="$${COVERITY_PATH:+$$COVERITY_PATH/bin:}$$PATH"; \ cd '$(distdir)'/_build \ && cov-build --dir cov-int ../build.sh