libtool-patches
[Top][All Lists]
Advanced

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

Re: HEAD: Makefile woes (1/n)


From: Bob Friesenhahn
Subject: Re: HEAD: Makefile woes (1/n)
Date: Sun, 5 Feb 2006 11:08:14 -0600 (CST)

On Sun, 5 Feb 2006, Ralf Wildenhues wrote:

First observation: $(EXTRA_DIST) is used as prerequisite for `distdir'.
This means that we need to spell generated files in the source tree with
`$(srcdir)/' prefix, so non-GNU makes find the rebuilding rule (which
uses the prefix).  Or we could argue that `make dist' need work with GNU
make only.

Please somebody make sure this conclusion is sound, thanks.  If yes, I
guess Automake docs should be amended, too, to reflect this necessity.

OK to apply?  Or am I missing something?

Over the years I have always assumed that GNU make might be necessary for some maintainer activities even if only due to sloth. Requiring GNU make is not a good thing so Makefiles should work with generic makes as well if at all possible.

This patch looks good to apply to me.

Bob

There is BTW something else missing to get `pmake dist' to work
correctly: the tests/*demo*/ sub-configure-scripts are not rerun
as necessary.

Cheers,
Ralf

        * Makefile.am (EXTRA_DIST): Add `$(srcdir)/' to all generated
       files so that non-GNU make programs will use the rebuilding
       rules.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.189
diff -u -r1.189 Makefile.am
--- Makefile.am 1 Feb 2006 19:54:33 -0000       1.189
+++ Makefile.am 3 Feb 2006 20:34:38 -0000
@@ -121,7 +121,7 @@
        esac

sh_files        = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh
-EXTRA_DIST     += bootstrap libtoolize.in $(auxdir)/ltmain.m4sh \
+EXTRA_DIST     += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \
                  $(auxdir)/mkstamp $(sh_files) stamp-vcl \
                  ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
                  ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
@@ -159,7 +159,7 @@
# a loop otherwise.
# Use `$(srcdir)/m4' for the benefit of non-GNU makes: this is
# how ltversion.m4 appears in our dependencies.
-EXTRA_DIST += $(m4dir)/ltversion.in $(m4dir)/ltversion.m4
+EXTRA_DIST += $(m4dir)/ltversion.in $(srcdir)/$(m4dir)/ltversion.m4
$(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac 
$(srcdir)/stamp-vcl
        set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \
        cd $(srcdir); \
@@ -179,7 +179,7 @@
##           should make this rule depend on Makefile but that will break
##           distcheck (at least) by rebuilding ltmain.sh in the source
##           tree whenever config.status regenerates the Makefile.
-EXTRA_DIST += $(auxdir)/ltmain.sh
+EXTRA_DIST += $(srcdir)/$(auxdir)/ltmain.sh
$(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac \
                                $(srcdir)/stamp-vcl
        $(timestamp); \
@@ -231,13 +231,13 @@
        mv -f Makefile.inT Makefile.in
        echo stamp > $@

-EXTRA_DIST += libltdl/stamp-mk $(m4dir)/lt~obsolete.m4
+EXTRA_DIST += $(srcdir)/libltdl/stamp-mk $(m4dir)/lt~obsolete.m4

$(srcdir)/libltdl/aclocal.m4: \
            $(m4dir)/libtool.m4 \
            $(m4dir)/ltoptions.m4 \
            $(m4dir)/ltdl.m4 \
-           $(m4dir)/ltversion.m4 \
+           $(srcdir)/$(m4dir)/ltversion.m4 \
            $(m4dir)/ltsugar.m4 \
            $(m4dir)/argz.m4 \
            $(m4dir)/lt~obsolete.m4
@@ -269,7 +269,7 @@

info_TEXINFOS           = doc/libtool.texi
libtool_TEXINFOS        = doc/PLATFORMS doc/fdl.texi doc/notes.texi
-EXTRA_DIST            += doc/notes.txt $(libtool_TEXINFOS)
+EXTRA_DIST            += $(srcdir)/doc/notes.txt $(libtool_TEXINFOS)

all-local: $(srcdir)/doc/notes.txt

@@ -399,7 +399,7 @@
                  tests/deplibs-ident.at \
                  tests/stresstest.at

-EXTRA_DIST     += $(TESTSUITE) $(TESTSUITE_AT) tests/package.m4
+EXTRA_DIST     += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) 
$(srcdir)/tests/package.m4

# Be sure to reexport important environment variables:
TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
@@ -426,7 +426,7 @@

# Use `$(srcdir)' for the benefit of non-GNU makes: this is
# how `testsuite' appears in our dependencies.
-$(srcdir)/$(TESTSUITE): tests/package.m4 $(TESTSUITE_AT)
+$(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT)
        cd $(srcdir)/tests && \
        $(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite

@@ -549,7 +549,7 @@

tests/demo-conf.test: libtool

-EXTRA_DIST     += tests/defs.in tests/defs.m4sh \
+EXTRA_DIST     += $(srcdir)/tests/defs.in tests/defs.m4sh \
                  $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)
DIST_SUBDIRS   += $(CONF_SUBDIRS)




======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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