monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] package_full_revision.txt and derived files


From: Patrick Mauritz
Subject: Re: [Monotone-devel] package_full_revision.txt and derived files
Date: Wed, 19 Jan 2005 20:01:13 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20050108)

Richard Levitte - VMS Whacker schrieb:
package_full_revision.txt is currently regarded as a .PHONY, which is
the reason it gets constantly rebuilt.  Is there a reason it can't
depend on MT/revision?
the attached patch guards most (I think all) txt2c executions with a cmp(1) call to check if anything actually changed (similar to the procedure with config.h in the configure script).

I'm not sure if that's actually valid, please review.

also, if there'd be a way to redefine the command name of autom4te (it's autom4te259 here), I'd be glad - not sure, if there's a default way to do that, which is why I don't have anything for that yet.


patrick mauritz
# 
# patch "Makefile.am"
#  from [fb88f80274a599e17d5e053054e82aa7c04fcb94]
#    to [4d7140b55fa0a3764504d46145e694e5e3232b9e]
# 
--- Makefile.am
+++ Makefile.am
@@ -309,10 +309,12 @@
        chmod 0755 address@hidden(EXEEXT)
 
 %.h: %.sql txt2c Makefile
-       ./txt2c $< $(*F) >$@
+       ./txt2c $< $(*F) >address@hidden
+       cmp address@hidden $@ || mv address@hidden $@; rm -f address@hidden
 
 %.h: %.lua txt2c Makefile
-       ./txt2c $< $(*F) >$@
+       ./txt2c $< $(*F) >address@hidden
+       cmp address@hidden $@ || mv address@hidden $@; rm -f address@hidden
 
 # A fake target so we can use MT/revision as a prerequisite, yet not
 # crash if MT/revision does not exist.
@@ -322,7 +324,8 @@
        if [ -f $< ]; then cp $< $@; fi
        if [ ! -f $@ ]; then echo "unknown" > $@; fi
 package_revision.h: package_revision.txt txt2c Makefile
-       ./txt2c --strip-trailing $< package_revision >$@
+       ./txt2c --strip-trailing $< package_revision >address@hidden
+       cmp address@hidden $@ || mv address@hidden $@; rm -f address@hidden
 
 .PHONY: package_full_revision.txt
 package_full_revision.txt:
@@ -337,7 +340,8 @@
         echo '  Generated from data cached in the distribution;'; \
         echo '  further changes may have been made.') >> $@
 package_full_revision.h: package_full_revision.txt txt2c Makefile
-       ./txt2c $< package_full_revision >$@
+       ./txt2c $< package_full_revision >address@hidden
+       cmp address@hidden $@ || mv address@hidden $@; rm -f address@hidden
 
 # automake doesn't build html docs
 

reply via email to

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