changeset 10085:82d47b706424

Remove unnecessary uses of simple_move_if_change_rule Rule prevents make from updating timestamps and should only be used where definite savings from reduced compilations outweight the commands that are executed every time make is invoked.
author Rik <rdrider0-list@yahoo.com>
date Mon, 11 Jan 2010 22:38:08 -0800
parents 81e88250bf42
children 76df75b10c80
files liboctave/ChangeLog liboctave/Makefile.am scripts/ChangeLog scripts/Makefile.am src/ChangeLog src/Makefile.am
diffstat 6 files changed, 35 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Mon Jan 11 16:07:15 2010 -0500
+++ b/liboctave/ChangeLog	Mon Jan 11 22:38:08 2010 -0800
@@ -1,3 +1,8 @@
+2010-01-11  Rik <octave@nomad.inbox5.com>
+
+	* Makefile.am: Remove unnecessary use of simple_move_if_change_rule to allow
+	Make to update timestamps
+
 2010-01-08  Jaroslav Hajek  <highegg@gmail.com>
 
 	* Array.h (Array<T>::crefT): New helper typedef.
--- a/liboctave/Makefile.am	Mon Jan 11 16:07:15 2010 -0500
+++ b/liboctave/Makefile.am	Mon Jan 11 22:38:08 2010 -0800
@@ -530,7 +530,7 @@
 $(OPT_INC) : %.h : %.in $(top_srcdir)/mk-opts.pl
 	@echo making $@ from $<
 	@$(PERL) $(top_srcdir)/mk-opts.pl --opt-class-header $< > $@-t
-	$(simple_move_if_change_rule)
+	mv $@-t $@
 
 $(VX_OP_INC) $(VX_OP_SRC) : $(srcdir)/mk-ops.awk vx-ops
 	$(AWK) -f $(srcdir)/mk-ops.awk prefix=vx $(srcdir)/vx-ops
@@ -543,7 +543,7 @@
 
 mx-ops.h : $(srcdir)/mk-ops.awk mx-ops
 	$(AWK) -f $(srcdir)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(srcdir)/mx-ops > $@-t
-	$(simple_move_if_change_rule)
+	mv $@-t $@
 
 DISTCLEANFILES = $(BUILT_INCS) $(BUILT_LIBOCTAVE_CXX_SOURCES)
 
--- a/scripts/ChangeLog	Mon Jan 11 16:07:15 2010 -0500
+++ b/scripts/ChangeLog	Mon Jan 11 22:38:08 2010 -0800
@@ -1,3 +1,8 @@
+2010-01-11  Rik <octave@nomad.inbox5.com>
+
+	* Makefile.am: Update DOCSTRINGS rules to avoid simple_move_if_change_rule
+	and allow Make to update timestamps.
+
 2010-01-11  Jaroslav Hajek  <highegg@gmail.com>
 
 	* plot/private/__scatter__.m: Use patch objects instead of lines,
--- a/scripts/Makefile.am	Mon Jan 11 16:07:15 2010 -0500
+++ b/scripts/Makefile.am	Mon Jan 11 22:38:08 2010 -0800
@@ -74,7 +74,7 @@
 
 FCN_FILES_IN = $(GEN_FCN_FILES:.m=.in)
 
-all-local: $(GEN_FCN_FILES) $(PKG_ADD_FILES) DOCSTRINGS
+all-local: $(GEN_FCN_FILES) $(PKG_ADD_FILES) .DOCSTRINGS
 
 octave_dirstamp = $(am__leading_dot)dirstamp
 
@@ -317,11 +317,15 @@
 
 gethelp_SOURCES = gethelp.cc
 
-DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) mkdoc $(gethelp_SOURCES)
+.DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) mkdoc $(gethelp_SOURCES) Makefile
 	@$(MAKE) $(AM_MAKEFLAGS) gethelp$(BUILD_EXEEXT)
-	$(cp_update_rule)
-	$(srcdir)/mkdoc "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@-t
-	$(simple_move_if_change_rule)
+	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
+		cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
+		touch -r $(srcdir)/DOCSTRINGS DOCSTRINGS; \
+	fi
+	$(srcdir)/mkdoc "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@
+	$(top_srcdir)/move-if-change $@ DOCSTRINGS
+	touch $@
 
 $(GEN_FCN_FILES) : %.m : %.in Makefile
 	$(do_subst_config_vals)
--- a/src/ChangeLog	Mon Jan 11 16:07:15 2010 -0500
+++ b/src/ChangeLog	Mon Jan 11 22:38:08 2010 -0800
@@ -1,3 +1,8 @@
+2010-01-11  Rik <octave@nomad.inbox5.com>
+
+	* Makefile.am: Update DOCSTRINGS rules to avoid simple_move_if_change_rule
+	and allow Make to update timestamps.
+
 2010-01-11  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/urlwrite.cc (curl_handle::lasterror):
--- a/src/Makefile.am	Mon Jan 11 16:07:15 2010 -0500
+++ b/src/Makefile.am	Mon Jan 11 22:38:08 2010 -0800
@@ -591,7 +591,7 @@
 
 octave_LDADD = $(OCTAVE_LIBS)
 
-all-local: $(OCT_FILES) DLD-FUNCTIONS/PKG_ADD DOCSTRINGS
+all-local: $(OCT_FILES) DLD-FUNCTIONS/PKG_ADD .DOCSTRINGS
 
 lex.lo lex.o oct-parse.lo oct-parse.o: \
   AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
@@ -631,10 +631,14 @@
 	$(srcdir)/mk-pkg-add $(DLD_DYNAMIC_DEF_FILES) > $@-t
 	mv $@-t $@
 
-DOCSTRINGS: gendoc$(BUILD_EXEEXT)
-	$(cp_update_rule)
-	./gendoc > $@-t
-	$(simple_move_if_change_rule)
+.DOCSTRINGS: gendoc$(BUILD_EXEEXT)
+	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
+		cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
+		touch -r $(srcdir)/DOCSTRINGS DOCSTRINGS; \
+	fi
+	./gendoc > $@
+	$(top_srcdir)/move-if-change $@ DOCSTRINGS
+	touch $@
 
 doc-files: $(DEF_FILES)
 	echo $(DEF_FILES) > $@-t