Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/'
From:
Jim Meyering
Subject:
Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/' subdir
Date:
Fri, 31 Aug 2012 21:59:26 +0200
Jim Meyering wrote:
> Jim Meyering wrote:
> ...
>> No problem.
>> Next step, "make distcheck". First failure is because inclusion of
>> version.h fails in the non-srcdir build:
> ...
>> This fixes it:
>>
>> diff --git a/src/local.mk b/src/local.mk
>
> FYI, here's another make distcheck problem,
> in case someone else can get to it before I do
> (it'll soon be dinner time here):
>
> make[2]: Entering directory
> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
> CC src/uname-arch.o
> CC src/hostname.o
> CCLD src/arch
> CCLD src/hostname
> GEN man/arch.1
> GEN man/hostname.1
> mkdir: cannot create directory 'man/arch.td': No such file or directory
> make[2]: *** [man/arch.1] Error 1
> make[2]: *** Waiting for unfinished jobs....
> mkdir: cannot create directory 'man/hostname.td': No such file or directory
> make[2]: *** [man/hostname.1] Error 1
> make[2]: Leaving directory
> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
> make[1]: *** [dist] Error 2
> make[1]: Leaving directory
> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
> make: *** [distcheck] Error 1
The fix for this is to create man and src directories:
diff --git a/configure.ac b/configure.ac
index 8c41d62..5dc4b0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,6 +464,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
# For a test of uniq: it uses the $LOCALE_FR envvar.
gt_LOCALE_FR
+# Now that configure no longer creates src/ or man/, create them here.
+# Doing it this way is more maintainable that adding to each individual
+# Makefile rule that creates a file in one of those sub-directories.
+$MKDIR_P man src
+
AC_CONFIG_FILES(
Makefile
lib/Makefile