changeset 21673:9631aac4b635

build: avoid writing to srcdir unless DOCSTRINGS contents change (bug #47832) * libinterp/module.mk, scripts/module.mk: Create temporary DOCSTRINGS files in the build directory, only move to $(srcdir) if the contents change.
author Mike Miller <mtmiller@octave.org>
date Tue, 03 May 2016 15:11:51 -0700
parents c579ab9ee4f3
children 5e083d07ba35
files libinterp/module.mk scripts/module.mk
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/module.mk	Tue May 03 09:59:17 2016 -0700
+++ b/libinterp/module.mk	Tue May 03 15:11:51 2016 -0700
@@ -294,9 +294,9 @@
 DOCSTRING_FILES += $(srcdir)/libinterp/DOCSTRINGS
 
 $(srcdir)/libinterp/DOCSTRINGS: $(ALL_DEF_FILES) | libinterp/$(octave-dirstamp)
-	$(AM_V_GEN)rm -f $@-t && \
-	$(PERL) $(srcdir)/libinterp/gendoc.pl $(ALL_DEF_FILES) > $@-t && \
-	$(SHELL) $(srcdir)/build-aux/move-if-change $@-t $@
+	$(AM_V_GEN)rm -f libinterp/DOCSTRINGS-t && \
+	$(PERL) $(srcdir)/libinterp/gendoc.pl $(ALL_DEF_FILES) > libinterp/DOCSTRINGS-t && \
+	$(SHELL) $(srcdir)/build-aux/move-if-change libinterp/DOCSTRINGS-t $@
 
 endif
 
--- a/scripts/module.mk	Tue May 03 09:59:17 2016 -0700
+++ b/scripts/module.mk	Tue May 03 15:11:51 2016 -0700
@@ -104,9 +104,9 @@
 DOCSTRING_FILES += $(srcdir)/scripts/DOCSTRINGS
 
 $(srcdir)/scripts/DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) | scripts/$(octave-dirstamp)
-	$(AM_V_GEN)rm -f $@-t && \
-	$(PERL) $(srcdir)/scripts/mkdoc.pl "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@-t && \
-	$(SHELL) $(srcdir)/build-aux/move-if-change $@-t $@
+	$(AM_V_GEN)rm -f scripts/DOCSTRINGS-t && \
+	$(PERL) $(srcdir)/scripts/mkdoc.pl "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > scripts/DOCSTRINGS-t && \
+	$(SHELL) $(srcdir)/build-aux/move-if-change scripts/DOCSTRINGS-t $@
 
 endif