Mercurial > hg > octave-nkf
changeset 17830:f22714d4a5da
build: Don't use JAVA_CPPFLAGS, FT2_CPPFLAGS everywhere when making .df files.
*.cc -> *.df rule now stops build when it fails (as it should have done before).
* libinterp/Makefile.am: Remove FONTCONFIG_CPPFLAGS, FT2_CPPFLAGS,
JAVA_CPPFLAGS from defaulte *.cc -> *.df rule. Abort make if rule
errors out.
* libinterp/corefcn/module.mk: Add overriding *.cc -> *.df rule
for files which use (FONTCONFIG|FT2)_CPPFLAGS.
* libinterp/octave-value/module.mk: Add overriding *.cc -> *.df rule
for files which use JAVA_CPPFLAGS.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 02 Nov 2013 14:34:02 -0700 |
parents | c2d9d42f4fe1 |
children | a5c4efa2e5a3 |
files | libinterp/Makefile.am libinterp/corefcn/module.mk libinterp/octave-value/module.mk |
diffstat | 3 files changed, 37 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/Makefile.am +++ b/libinterp/Makefile.am @@ -228,20 +228,15 @@ DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@ ## Rule to build a DEF file from a .cc file -## -## FIXME: This rule should be fixed to avoid using special -## flags like JAVA_CPPFLAGS for every file. How could it be written -## so that it uses octave_value_liboctave_value_la_CPPFLAGS when -## generating the octave-value/*.df files? -## +## 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 $(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(FONTCONFIG_CPPFLAGS) $(FT2_CPPFLAGS) \ - $(JAVA_CPPFLAGS) $(LLVM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CPPFLAGS) $(LLVM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) \ - -DMAKE_BUILTINS $< | $(srcdir)/mkdefs $(srcdir) $< > $@-t - mv $@-t $@ + -DMAKE_BUILTINS $< > $@-t + $(srcdir)/mkdefs $(srcdir) $< < $@-t > $@ + rm $@-t ## Rules to build test files
--- a/libinterp/corefcn/module.mk +++ b/libinterp/corefcn/module.mk @@ -261,12 +261,28 @@ $(JIT_SRC) \ $(C_COREFCN_SRC) +COREFCN_FT2_DF = \ + corefcn/graphics.df \ + corefcn/gl-render.df \ + corefcn/toplev.df \ + corefcn/txt-eng-ft.df + ## FIXME: Automake does not support per-object rules. ## These rules could be emulated by creating a new convenience ## library and using per-library rules. Or we can just live ## without the rule since there haven't been any problems. (09/18/2012) #display.df display.lo: CPPFLAGS += $(X11_FLAGS) +## 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 + $(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(FONTCONFIG_CPPFLAGS) $(FT2_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + -DMAKE_BUILTINS $< > $@-t + $(srcdir)/mkdefs $(srcdir) $< < $@-t > $@ + rm $@-t + ## Special rules for sources which must be built before rest of compilation. ## defaults.h and graphics.h must depend on Makefile. Calling configure
--- a/libinterp/octave-value/module.mk +++ b/libinterp/octave-value/module.mk @@ -127,6 +127,22 @@ $(OV_INTTYPE_SRC) \ $(OV_SPARSE_SRC) +OV_JAVA_DF = \ + octave-value/ov.df \ + octave-value/ov-class.df \ + octave-value/ov-java.df \ + octave-value/ov-typeinfo.df + +## Special rules for Java .df files so that not all .df files are built with +## JAVA_CPPFLAGS +$(OV_JAVA_DF) : octave-value/%.df : octave-value/%.cc + $(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(JAVA_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + -DMAKE_BUILTINS $< > $@-t + $(srcdir)/mkdefs $(srcdir) $< < $@-t > $@ + rm $@-t + noinst_LTLIBRARIES += octave-value/liboctave-value.la octave_value_liboctave_value_la_SOURCES = $(OCTAVE_VALUE_SRC)