libtool-patches
[Top][All Lists]
Advanced

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

ltmain rebuild rules


From: Ralf Wildenhues
Subject: ltmain rebuild rules
Date: Wed, 11 Apr 2007 20:06:53 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hmm, I'm still having an issue with the rebuild rules for `libtool'.
I edit ltmain.m4sh, save, type `make', but nothing gets rebuilt.

Testing for empty prerequisite list and killing the dependency on the
phony `clean-ltmain-sh' rule (otherwise pmake puts it in $? and
rebuilds) helps a bit, see the patch below.  I suppose that isn't right
though, and we need to "parse" $? somehow.  Before I embark upon this
(and do `make' portability testing), a couple of questions though: would
it be ok to kill `clean-ltmain-sh' totally -- IIRC it was supposed to
help people upgrade from some CVS revision to some other CVS revision?
If yes, is `ChangeLog' the only other dependency which we want to be
ignoring newer time stamps for?  Similar for rebuilding ltversion.m4?

Cheers,
Ralf

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.216
diff -u -r1.216 Makefile.am
--- Makefile.am 29 Mar 2007 18:09:37 -0000      1.216
+++ Makefile.am 11 Apr 2007 18:05:17 -0000
@@ -89,9 +89,9 @@
 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
 # would rerun configure on every invocation, so now we manually
 # check the version numbers from the build rule when necessary.
-libtool: clean-ltmain-sh $(top_builddir)/config.status 
$(srcdir)/$(auxdir)/ltmain.sh ChangeLog
+libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
        @target=libtool; $(rebuild); \
-       if test -f "$$target"; then \
+       if test -f "$$target" && test -z "$?"; then \
          set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
          test "$$actualver" = "$$correctver" && rebuild=false; \
        fi; \
@@ -197,9 +197,9 @@
 ##           distcheck (at least) by rebuilding ltmain.sh in the source
 ##           tree whenever config.status regenerates the Makefile.
 EXTRA_DIST += $(srcdir)/$(auxdir)/ltmain.sh
-$(srcdir)/$(auxdir)/ltmain.sh: clean-ltmain-sh $(sh_files) 
$(auxdir)/ltmain.m4sh configure.ac ChangeLog
+$(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac 
ChangeLog
        @target='$(srcdir)/$(auxdir)/ltmain.sh'; $(rebuild); \
-       if test -f "$$target"; then \
+       if test -f "$$target" && test -z "$?"; then \
          eval `sed -n '/^package_revision=/p' "$$target"`; \
          actualver=$$package_revision; \
          test "$$actualver" = "$$correctver" && rebuild=false; \
@@ -208,6 +208,8 @@
          cd $(srcdir); \
          rm -f $(auxdir)/ltmain.in $(auxdir)/ltmain.tmp \
            $(auxdir)/ltmain.sh; \
+         echo $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
+           \> $(auxdir)/ltmain.in; \
          $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
            > $(auxdir)/ltmain.in; \
          input="ltmain.m4sh"; \




reply via email to

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