[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make dist fails on init.sh
From: |
Jim Meyering |
Subject: |
Re: make dist fails on init.sh |
Date: |
Sun, 01 Jan 2012 17:56:01 +0100 |
Jim Meyering wrote:
> Tom G. Christensen wrote:
>> Since 2011-12-24 my daily make distcheck is failing with this error:
>> ...
>> make[1]: Entering directory `/home/tgc/projects/gnulib/build/gllib'
>> make[1]: *** No rule to make target `init.sh', needed by `distdir'. Stop.
>> make[1]: Leaving directory `/home/tgc/projects/gnulib/build/gllib'
>>
>> I guess this is an oversight after the changes that went in on 2011-12-23.
>
> Hi Tom,
>
> Can you tell me precisely how to reproduce that?
> I've built "make distcheck" successfully via numerous
> projects using up to date gnulib since then.
>
> I've also run some stand-alone tests like this,
> that run the new test-init.sh test:
>
> ./gnulib-tool --create-testdir --with-tests --test inttostr
>
> So far, all have passed.
BTW, thanks for the report.
My example was running only "make check", and no rule that built "dist".
Once I realized that, it's easy to reproduce the problem:
./gnulib-tool --create-testdir --with-tests --dir x inttostr \
&& cd x && ./configure && make && make dist
I don't yet see a clean way to fix this.
The patch below makes the above pass by ensuring that the EXTRA_DIST
augmentation happens only in the -tests module. That makes
gnulib-tool generate the desired EXTRA_DIST += init.sh line
only in the gltests sub-directory. That would in turn mean that
every module that depends on test-framework-sh should really
be depending on test-framework-sh-tests, in order to get init.sh.
I suppose I could put init.sh in build-aux/. Then gnulib-tool's
automatic mechanisms would do the right thing, but then I'd have
to adjust all uses of the script to expect to find init.sh in
build-aux/ rather than the gltests/ directory.
I'm about to push this:
>From 15d2d3297af494d59a3c108a4a15bf71592678a8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 1 Jan 2012 17:51:36 +0100
Subject: [PATCH] test-framework-sh: init.sh: fix "make dist" failure
When using gnulib-tool's --with-tests option and any module that
depends on test-framework-sh, "make dist" would fail due to the
lack of init.sh *in lib/*. The EXTRA_DIST += init.sh is required
in the gltests directory, and not in the gllib/ directory.
One way to work around that is to move the EXTRA_DIST += init.sh
from the primary module to the -tests one:
* modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
* modules/test-framework-sh (Makefile.am): ...not here.
Reported by Tom G. Christensen in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
---
ChangeLog | 12 ++++++++++++
modules/test-framework-sh | 1 -
modules/test-framework-sh-tests | 1 +
3 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 185c64d..ccc923b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2012-01-01 Jim Meyering <address@hidden>
+ test-framework-sh: init.sh: fix "make dist" failure
+ When using gnulib-tool's --with-tests option and any module that
+ depends on test-framework-sh, "make dist" would fail due to the
+ lack of init.sh *in lib/*. The EXTRA_DIST += init.sh is required
+ in the gltests directory, and not in the gllib/ directory.
+ One way to work around that is to move the EXTRA_DIST += init.sh
+ from the primary module to the -tests one:
+ * modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
+ * modules/test-framework-sh (Makefile.am): ...not here.
+ Reported by Tom G. Christensen in
+ http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
+
version-etc: update copyright year reported by --version
* lib/version-etc.c (COPYRIGHT_YEAR): Update to 2012.
diff --git a/modules/test-framework-sh b/modules/test-framework-sh
index ee913a4..249f426 100644
--- a/modules/test-framework-sh
+++ b/modules/test-framework-sh
@@ -9,7 +9,6 @@ Depends-on:
configure.ac:
Makefile.am:
-EXTRA_DIST += init.sh
Include:
diff --git a/modules/test-framework-sh-tests b/modules/test-framework-sh-tests
index 17dff9e..38570f4 100644
--- a/modules/test-framework-sh-tests
+++ b/modules/test-framework-sh-tests
@@ -7,3 +7,4 @@ configure.ac:
Makefile.am:
TESTS += test-init.sh
+EXTRA_DIST += init.sh
--
1.7.8.1.391.g2c2ad