m4-patches
[Top][All Lists]
Advanced

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

Re: GNUmakefile and VPATH


From: Eric Blake
Subject: Re: GNUmakefile and VPATH
Date: Tue, 04 Mar 2008 06:57:51 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ralf, Jim,

According to Jim Meyering on 3/4/2008 4:37 AM:
|>> +      [AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])])
|> Until Automake is fixed, this will cause
|>   ./configure && make distclean
|>
|> to bogusly remove GNUmakefile.
|
| Rats!  Thanks for the heads-up, Ralf.

However, the automake manual states that "parts of the specification using
shell variables will be ignored as far as cleaning and distributing is
concerned".  So how about this workaround?

(Should we also have a distclean-local rule in Makefile.am that removes
the GNUmakefile symlink in VPATH builds, but is a no-op in in-place builds?)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHzVVe84KuGfSFAYARAiKdAJ0WSbyx7upHVo8OWMU5hi1QJUdXCQCgoAcu
ymTF0HzVDSXkvF+MnQ3C/Q4=
=fOt/
-----END PGP SIGNATURE-----
>From f3fdef8360d2858548de71be50f2f9963c89f781 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 4 Mar 2008 06:54:29 -0700
Subject: [PATCH] Reinstate GNUmakefile patch, but with workaround for automake.

* configure.ac (AC_CONFIG_LINKS): Use shell variable to bypass
automake distclean rules.

Signed-off-by: Eric Blake <address@hidden>
---
 configure.ac |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index d55b2da..d8a12a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -337,13 +337,14 @@ dnl Allow maintainer rules under GNU make even in VPATH 
builds.  This does
 dnl not work in autoconf 2.61 or earlier, but we don't want to require
 dnl non-maintainers to use unreleased autoconf, hence the version test.
 dnl TODO remove the version check once autoconf 2.62 is released.
-
-dnl Disabled for now, since this would cause "make distclean" to
-dnl remove the sole copy of GNUmakefile in a non-VPATH build.
-dnl TODO restore once automake has been fixed to do the right thing.
-dnl m4_if(m4_version_compare([2.61a.100],
-dnl       m4_defn([m4_PACKAGE_VERSION])), [1], [],
-dnl       [AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])])
+dnl Meanwhile, we must use a shell variable so that we bypass automake's
+dnl attempts to remove the sole copy of GNUmakefile in a non-VPATH build
+dnl during 'make distclean'.
+dnl TODO avoid the shell variable once automake is fixed.
+GNUmakefile=GNUmakefile:GNUmakefile
+m4_if(m4_version_compare([2.61a.100],
+        m4_defn([m4_PACKAGE_VERSION])), [1], [],
+      [AC_CONFIG_LINKS([$GNUmakefile], [], [GNUmakefile=$GNUmakefile])])
 
 AC_CONFIG_FILES(
   Makefile
-- 
1.5.4


reply via email to

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