[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/'
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir |
Date: |
Sat, 01 Sep 2012 12:18:22 +0200 |
On 09/01/2012 10:59 AM, Jim Meyering wrote:
> Jim Meyering wrote:
> ...
>>> FYI, here's another make distcheck problem,
> ...
>> And here's another:
> ...
>> make[3]: Makefile: No such file or directory
>> make[3]: *** No rule to make target `Makefile'. Stop.
>> make[3]: Entering directory
>> /h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty'
>> Making distclean in lib
>> make[4]: Entering directory
>> /h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty/lib'
>
> I tracked that to a now-stale use of -C src -f Makefile.
> You're welcome to merge this into the appropriate patch:
>
> diff --git a/dist-check.mk b/dist-check.mk
> index 6706ea0..6e5726a 100644
> --- a/dist-check.mk
> +++ b/dist-check.mk
> @@ -11,8 +11,8 @@ pfx=$(t)/i
>
> built_programs = \
> $$(echo 'spy:;@echo $$(bin_PROGRAMS)' \
> - | MAKEFLAGS= $(MAKE) -s -C src -f Makefile -f - spy \
> - | fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u)
> + | MAKEFLAGS= $(MAKE) -s -f Makefile -f - spy \
> + | fmt -1 | sed 's,src/,,;s,$(EXEEXT)$$,,' | sort -u)
>
> # More than once, tainted build and source directory names would
> # have caused at least one "make check" test to apply "chmod 700"
>
Or ever better, what about this patch?
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
>From dcae42c8c1d171200f3e91d2f1a8ce00bda54527 Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Sat, 1 Sep 2012 12:15:59 +0200
Subject: [PATCH] maint: avoid yet another spurious "make distcheck" failure
* dist-check.mk (built_programs): There's no need to issue recursive
make calls in 'src/' to define this (in fact, that works no longer
now that 'src/Makefile.am' is gone). Simply define this to the sorted
contents of $(bin_PROGRAMS), with the 'src/' prefix and the $(EXEEXT)
suffix (if any) removed.
Reported-by: Jim Meyering <address@hidden>
---
dist-check.mk | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dist-check.mk b/dist-check.mk
index 6706ea0..533b7f9 100644
--- a/dist-check.mk
+++ b/dist-check.mk
@@ -9,10 +9,7 @@ tmpdir = $(abs_top_builddir)/tests/torture
t=$(tmpdir)/$(PACKAGE)/test
pfx=$(t)/i
-built_programs = \
- $$(echo 'spy:;@echo $$(bin_PROGRAMS)' \
- | MAKEFLAGS= $(MAKE) -s -C src -f Makefile -f - spy \
- | fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u)
+built_programs := $(sort $(patsubst src/%$(EXEEXT),%,$(bin_PROGRAMS)))
# More than once, tainted build and source directory names would
# have caused at least one "make check" test to apply "chmod 700"
--
1.7.12