diff libinterp/corefcn/module.mk @ 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 09ed6f7538dd
line wrap: on
line diff
--- a/libinterp/corefcn/module.mk	Fri Feb 20 08:45:23 2015 -0800
+++ b/libinterp/corefcn/module.mk	Fri Feb 20 17:18:19 2015 -0500
@@ -25,13 +25,14 @@
   $(top_builddir)/liboctave/numeric/Quad-opts.h
 
 $(OPT_HANDLERS): corefcn/%.cc : $(top_builddir)/liboctave/numeric/%.in
-	$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-handler-fcns $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(PERL) $(top_srcdir)/build-aux/mk-opts.pl --opt-handler-fcns $< > $@-t && \
 	mv $@-t $@
 
 $(OPT_HANDLERS): $(top_srcdir)/build-aux/mk-opts.pl
 
 $(OPT_INC) : %.h : %.in
-	$(MAKE) -C $(top_builddir)/liboctave/numeric $(@F)
+	$(AM_V_GEN)$(MAKE) -C $(top_builddir)/liboctave/numeric $(@F)
 
 JIT_INC = \
   corefcn/jit-util.h \
@@ -280,11 +281,12 @@
 ## Special rules for FreeType .df files so that not all .df files are built
 ## with FT2_CPPFLAGS, FONTCONFIG_CPPFLAGS
 $(COREFCN_FT2_DF) : corefcn/%.df : corefcn/%.cc
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	$(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	  $(AM_CPPFLAGS) $(FONTCONFIG_CPPFLAGS) $(FT2_CPPFLAGS) $(CPPFLAGS) \
 	  $(AM_CXXFLAGS) $(CXXFLAGS) \
-	  -DMAKE_BUILTINS $< > $@-t
-	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@
+	  -DMAKE_BUILTINS $< > $@-t && \
+	$(srcdir)/mkdefs $(srcdir) $< < $@-t > $@ && \
 	rm $@-t
 
 ## Special rules for sources which must be built before rest of compilation.
@@ -293,38 +295,44 @@
 ## may change default/config values.  However, calling configure will also
 ## regenerate the Makefiles from Makefile.am and trigger the rules below.
 corefcn/defaults.h: corefcn/defaults.in.h Makefile
-	@$(do_subst_default_vals)
+	$(AM_V_GEN)$(do_subst_default_vals)
 
 corefcn/graphics.h: corefcn/graphics.in.h genprops.awk Makefile
-	$(AWK) -f $(srcdir)/genprops.awk $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -f $(srcdir)/genprops.awk $< > $@-t && \
 	mv $@-t $@
 
 corefcn/graphics-props.cc: corefcn/graphics.in.h genprops.awk Makefile
-	$(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-errno.cc: corefcn/oct-errno.in.cc Makefile
+	$(AM_V_GEN)rm -f $@-t $@ && \
 	if test -n "$(PERL)"; then \
 	  $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \
 	elif test -n "$(PYTHON)"; then \
 	  $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \
 	else \
 	  $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \
-	fi
+	fi && \
 	mv $@-t $@
 
 corefcn/mxarray.h: corefcn/mxarray.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_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t
+	  -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-tex-lexer.ll: corefcn/oct-tex-lexer.in.ll corefcn/oct-tex-symbols.in Makefile.am
-	$(AWK) 'BEGIN { print "/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */"; } /^@SYMBOL_RULES@$$/ { count = 0; while (getline < "$(srcdir)/corefcn/oct-tex-symbols.in") { if ($$0 !~ /^#.*/ && NF == 3) { printf("\"\\\\%s\" { yylval->sym = %d; return SYM; }\n", $$1, count); count++; } } getline } ! /^@SYMBOL_RULES@$$/ { print }' $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) 'BEGIN { print "/* DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-lexer.in.ll and oct-tex-symbols.in. */"; } /^@SYMBOL_RULES@$$/ { count = 0; while (getline < "$(srcdir)/corefcn/oct-tex-symbols.in") { if ($$0 !~ /^#.*/ && NF == 3) { printf("\"\\\\%s\" { yylval->sym = %d; return SYM; }\n", $$1, count); count++; } } getline } ! /^@SYMBOL_RULES@$$/ { print }' $< > $@-t && \
 	mv $@-t $@
 
 corefcn/oct-tex-symbols.cc: corefcn/oct-tex-symbols.in Makefile.am
-	$(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } !/^#/ && (NF == 3) { printf("  { %s, %s },\n", $$2, $$3); count++; }' $< > $@-t
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	$(AWK) 'BEGIN { print "// DO NOT EDIT. AUTOMATICALLY GENERATED FROM oct-tex-symbols.in."; print "static uint32_t symbol_codes[][2] = {"; count = 0; } END { print "};"; printf("static int num_symbol_codes = %d;\n", count); } !/^#/ && (NF == 3) { printf("  { %s, %s },\n", $$2, $$3); count++; }' $< > $@-t && \
 	mv $@-t $@
 
 corefcn/txt-eng.cc: corefcn/oct-tex-symbols.cc
@@ -332,7 +340,7 @@
 corefcn/oct-tex-parser.h: corefcn/oct-tex-parser.yy
 
 corefcn/oct-tex-parser.yy: corefcn/oct-tex-parser.in.yy
-	$(call subst-bison-api-decls,octave_tex_)
+	$(AM_V_GEN)$(call subst-bison-api-decls,octave_tex_)
 
 noinst_LTLIBRARIES += \
   corefcn/libcorefcn.la \