diff libinterp/Makefile.am @ 19826:4f6ae6b94abe

make --enable-silent-rules configure option more useful * sparse-mx-ops: Rename from smx-ops. * genpropdoc.m: Write to stdout if filename is not supplied. * Makefile.am, build-aux/common.mk, doc/interpreter/Makefile.am, doc/interpreter/graphics_properties.mk, etc/icons/Makefile.am, libgui/Makefile.am, libinterp/Makefile.am, libinterp/corefcn/module.mk, libinterp/octave-value/module.mk, libinterp/operators/module.mk, libinterp/parse-tree/module.mk, liboctave/cruft/module.mk, liboctave/cruft/ranlib/module.mk, liboctave/cruft/slatec-fn/module.mk, liboctave/numeric/module.mk, liboctave/operators/module.mk, scripts/Makefile.am, scripts/java/module.mk, src/Makefile.am, test/Makefile.am: Preface rules with $(AM_V_GEN) or similar as needed. Improve consistency of rules. Prefer commands that write to stdout, redirecting output to $@-t, then moving to $@. * doc/interpreter/images.awk, libinterp/dldfcn/config-module.awk: Generate rules with $(AM_V_GEN).
author John W. Eaton <jwe@octave.org>
date Fri, 20 Feb 2015 17:18:19 -0500
parents a941a65c7cb8
children 925fdd91abba
line wrap: on
line diff
--- a/libinterp/Makefile.am	Fri Feb 20 08:45:23 2015 -0800
+++ b/libinterp/Makefile.am	Fri Feb 20 17:18:19 2015 -0500
@@ -241,12 +241,14 @@
 ## See also module.mk files for overrides when speciall CPPFLAGS are needed.
 ## FIXME: Shouldn't the build stop if CPP fails here?  Yes (10/31/2013)
 %.df: %.cc
+	$(AM_V_GEN)rm -f $@-t $@-t1 $@ && \
 	$(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	  $(AM_CPPFLAGS) $(LLVM_CPPFLAGS) $(CPPFLAGS) \
 	  $(AM_CXXFLAGS) $(CXXFLAGS) \
-	  -DMAKE_BUILTINS $< > $@-t
-	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@
-	rm $@-t
+	  -DMAKE_BUILTINS $< > $@-t1 && \
+	$(srcdir)/mkdefs $(srcdir) $< < $@-t1 > $@-t && \
+	mv $@-t $@ && \
+	rm -f $@-t1
 
 ## Rules to build test files
 
@@ -272,13 +274,15 @@
 ## However, calling configure will also regenerate the Makefiles from
 ## Makefile.am and trigger the rules below.
 oct-conf.h: oct-conf.in.h Makefile
-	@$(do_subst_config_vals)
+	$(AM_V_GEN)$(do_subst_config_vals)
 
 oct-conf-features.h: $(top_builddir)/config.h config-features.sh
-	$(srcdir)/config-features.sh $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/config-features.sh $< > $@-t && \
 	mv $@-t $@
 
 version.h: version.in.h Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(SED) < $< \
 	  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically from $(<F) by Make.|" \
 	  -e "s|%OCTAVE_API_VERSION%|\"${OCTAVE_API_VERSION}\"|" \
@@ -287,34 +291,38 @@
           -e "s|%OCTAVE_MINOR_VERSION%|${OCTAVE_MINOR_VERSION}|" \
           -e "s|%OCTAVE_PATCH_VERSION%|${OCTAVE_PATCH_VERSION}|" \
 	  -e "s|%OCTAVE_RELEASE_DATE%|\"${OCTAVE_RELEASE_DATE}\"|" \
-	  -e "s|%OCTAVE_VERSION%|\"${OCTAVE_VERSION}\"|" > $@-t
+	  -e "s|%OCTAVE_VERSION%|\"${OCTAVE_VERSION}\"|" > $@-t && \
 	mv $@-t $@
 
 builtins.cc: $(DEF_FILES) mkbuiltins
-	$(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t && \
 	mv $@-t $@
 
 builtin-defun-decls.h: $(SRC_DEF_FILES) mkbuiltins
-	$(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t && \
 	mv $@-t $@
 
 if AMCOND_ENABLE_DYNAMIC_LINKING
 DLDFCN_PKG_ADD_FILE = dldfcn/PKG_ADD
 
 dldfcn/PKG_ADD: $(DLDFCN_DEF_FILES) mk-pkg-add
-	$(srcdir)/mk-pkg-add $(DLDFCN_DEF_FILES) > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(srcdir)/mk-pkg-add $(DLDFCN_DEF_FILES) > $@-t && \
 	mv $@-t $@
 endif
 
 if AMCOND_BUILD_DOCS
 .DOCSTRINGS: $(ALL_DEF_FILES) gendoc.pl
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
 		cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
 		touch -r $(srcdir)/DOCSTRINGS DOCSTRINGS; \
-	fi
-	@echo "creating .DOCSTRINGS from .cc source files"
-	@$(PERL) $(srcdir)/gendoc.pl $(ALL_DEF_FILES) > $@
-	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS
+	fi && \
+	$(PERL) $(srcdir)/gendoc.pl $(ALL_DEF_FILES) > $@-t && \
+	mv $@-t $@ && \
+	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS && \
 	touch $@
 
 all-local: $(OCT_STAMP_FILES) $(DLDFCN_PKG_ADD_FILE) .DOCSTRINGS