coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 22/22] maint: avoid distcheck failure by properly cleaning $(


From: Jim Meyering
Subject: Re: [PATCH 22/22] maint: avoid distcheck failure by properly cleaning $(EXTRA_MANS)
Date: Sat, 01 Sep 2012 11:45:12 +0200

Jim Meyering wrote:

> Stefano Lattarini wrote:
>
>> From: Jim Meyering <address@hidden>
>>
>> * man/local.mk (distclean-local): Remove $(ALL_MANS) when doing
>> a VPATH build.  If it's not done, generated manpages can be left
>> around in the build directory after a "make distclean", causing
>> failures in "make distcheck".
>> ---
>>  man/local.mk | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/man/local.mk b/man/local.mk
>> index 8904eb5..da7de24 100644
>> --- a/man/local.mk
>> +++ b/man/local.mk
>> @@ -35,6 +35,11 @@ MAINTAINERCLEANFILES += $(ALL_MANS)
>>  # the manpages must be generated before the distdir is created and filled.
>>  $(EXTRA_MANS): $(all_programs)
>>
>> +# This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
>> +# Without this, "make distcheck" might fail.
>> +distclean-local:
>> +    test $(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
>
> Using your new ALL_MANS variable is fine here, but when you
> modified my patch, you removed the "x" on the first term of that test.
> And that caused a hard-to-diagnose "make distcheck" failure.
>
> This is obviously what you intended:
> (and what I've merged into that commit, locally)
>
> diff --git a/man/local.mk b/man/local.mk
> index 8c1ec60..98cc4fd 100644
> --- a/man/local.mk
> +++ b/man/local.mk
> @@ -38,7 +38,7 @@ $(EXTRA_MANS): $(all_programs)
>  # This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
>  # Without this, "make distcheck" might fail.
>  distclean-local:
> -     test $(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
> +     test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
>
>  # Dependencies common to all man pages.  Updated below.
>  mandeps =
>
> With this (final?) change, I expect "make distcheck" to succeed
> using my current set of patches.

Not quite:

    GEN      man/nice.1
    GEN      man/who.1
    GEN      man/users.1
    GEN      man/pinky.1
  ln: target 'nice' is not a directory
  ln: target 'hostid' is not a directory
    GEN      man/uptime.1
  make[5]: *** [man/hostid.1] Error 1
  make[5]: *** Waiting for unfinished jobs....
  make[5]: *** [man/nice.1] Error 1
  ln: target 'pinky' is not a directory
  make[5]: *** [man/pinky.1] Error 1
  ln: target 'chroot' is not a directory
  ln: target 'who' is not a directory
  make[5]: *** [man/who.1] Error 1
  make[5]: *** [man/chroot.1] Error 1
  ln: target 'users' is not a directory
  make[5]: *** [man/users.1] Error 1
  ln: target 'uptime' is not a directory
  make[5]: *** [man/uptime.1] Error 1
  make[5]: Leaving directory `/h/j/w/co/cu/tests/torture/taint/a 
b/coreutils-8.19.83-09b22-dirty'
  make[4]: *** [all-recursive] Error 1
  make[4]: Leaving directory `/h/j/w/co/cu/tests/torture/taint/a 
b/coreutils-8.19.83-09b22-dirty'
  make[3]: *** [all] Error 2
  make[3]: Leaving directory `/h/j/w/co/cu/tests/torture/taint/a 
b/coreutils-8.19.83-09b22-dirty'
  make[2]: *** [taint-distcheck] Error 2
  make[2]: Leaving directory `/h/j/w/co/cu'
  make[1]: *** [distcheck-hook] Error 2
  make[1]: Leaving directory `/h/j/w/co/cu'
  make: *** [distcheck] Error 1

That was caused by this:

commit c81ac64ce71cca4ef268429bcf57f341e6a25bc3
Author: Stefano Lattarini <address@hidden>
Date:   Wed Aug 29 16:22:38 2012 +0200

    build: make a rule less dependent on exact source tree layout

    This is mostly a preparatory change in view of future ones.

    * man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access
    the 'src' directory.

diff --git a/man/Makefile.am b/man/Makefile.am
index 3d6a963..ff1c1ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -168,7 +168,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; 
s/^test$$/[/'`
            && {                                                \
                 rm -rf $t;                                     \
                 mkdir $t;                                      \
-                (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+                (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
                    $(PERL) -- $(srcdir)/help2man               \
                     --source='$(PACKAGE_STRING)'               \
                     --include=$(srcdir)/$*.x                   \

And fixed by this:

>From 377fcd9cd972bbfca7115664e61d031e7bc3036e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 1 Sep 2012 11:44:39 +0200
Subject: [PATCH] build: restore handling of space-tainted build directory
 name

* man/local.mk: With commit v8.19-84-g08cf455, man page creation
would fail when using a build directory name containing e.g.,
spaces.
---
 man/local.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/local.mk b/man/local.mk
index 98cc4fd..1c8ecfa 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -181,7 +181,7 @@ man/yes.1:       src/yes
          && t=$*.td                                                    \
          && rm -rf $$t                                                 \
          && $(MKDIR_P) $$t                                             \
-         && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)  \
+         && (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog $$name) \
          && $(PERL) -- $(srcdir)/man/help2man                          \
                     --source='$(PACKAGE_STRING)'                       \
                     --include=$(srcdir)/man/$$name.x                   \
--
1.7.12.146.g16d26b1

There's still at least one more problem.



reply via email to

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