automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FYI] {test-protocols} test harness: "make -n check" works correctly


From: Stefano Lattarini
Subject: Re: [FYI] {test-protocols} test harness: "make -n check" works correctly with Solaris make
Date: Mon, 8 Aug 2011 13:21:14 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Monday 08 August 2011, Stefano Lattarini wrote:
> To avoid some recipes being executed with "make -n", we used the
> trick of issuing recursive make calls not directly with $(MAKE),
> but with a simple indirection instead:
>   ...
>   am__stealth_MAKE = $(MAKE)
>   ...
>   target:
>       ... $(am__stealth_MAKE) ...
>   ...
> This hack worked with GNU make, but, unfortunately, not with
> Solaris make.  The present change removes the hack, and uses more
> proper idioms to avoid unwanted recipe executions with "make -n".
> 
> Bug exposed by test case `parallel-tests-dry-run.test'.
> 
Sigh, again I hadn't fully regenerated the Makefile.in files.  Luckily I
caught that before pushing this time.  Below is what I've squashed in:

diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 3d11fc5..5594390 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -366,10 +366,8 @@ am--redo-logs:
        test $$st -eq 0
 
 $(TEST_SUITE_LOG): $(TEST_LOGS)
-       @$(am__sh_e_setup); $(am__tty_colors); \
+       @$(am__set_TESTS_bases); \
        f_ok () { test -f "$$1" && test -r "$$1"; }; \
-       $(am__set_TESTS_bases); \
-       ws='[   ]'; \
        redo_bases=`for b in $$bases; do \
                      f_ok $$b.trs && f_ok $$b.log || echo $$b; \
                    done`; \
@@ -377,8 +375,10 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
          redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
          (export redo_bases redo_logs redo_results \
-           && $(MAKE) am--redo-logs) || exit 1; \
-       fi; \
+            && $(MAKE) am--redo-logs) || exit 1; \
+       else :; fi;
+       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+       ws='[   ]'; \
        results=`for b in $$bases; do echo $$b.trs; done`; \
        test -n "$$results" || results=/dev/null; \
        all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index dbf94c1..c35e270 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1520,10 +1520,8 @@ am--redo-logs:
        test $$st -eq 0
 
 $(TEST_SUITE_LOG): $(TEST_LOGS)
-       @$(am__sh_e_setup); $(am__tty_colors); \
+       @$(am__set_TESTS_bases); \
        f_ok () { test -f "$$1" && test -r "$$1"; }; \
-       $(am__set_TESTS_bases); \
-       ws='[   ]'; \
        redo_bases=`for b in $$bases; do \
                      f_ok $$b.trs && f_ok $$b.log || echo $$b; \
                    done`; \
@@ -1531,8 +1529,10 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
          redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
          (export redo_bases redo_logs redo_results \
-           && $(MAKE) am--redo-logs) || exit 1; \
-       fi; \
+            && $(MAKE) am--redo-logs) || exit 1; \
+       else :; fi;
+       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+       ws='[   ]'; \
        results=`for b in $$bases; do echo $$b.trs; done`; \
        test -n "$$results" || results=/dev/null; \
        all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]