From: Tom Tromey Date: Sun, 6 May 2001 23:01:34 +0000 (+0000) Subject: Fix for PR automake/132: X-Git-Tag: handle-languages~6 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=48ca3afd9281ff38c278db939ac4216bedfed328;p=automake.git Fix for PR automake/132: * automake.in (c, c++, objc, asm, ppf77): Add DEFAULT_INCLUDES to compilation. (java): Remove INCLUDES and DEFS from compilation. (lang_c_finish): Add DEFAULT_INCLUDES to compilation. * compile.am (DEFS): Don't include %DEFAULT_INCLUDES%. (DEFAULT_INCLUDES): New macro. --- diff --git a/ChangeLog b/ChangeLog index fa77c238..ff9d01cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2001-05-06 Tom Tromey + Fix for PR automake/132: + * automake.in (c, c++, objc, asm, ppf77): Add DEFAULT_INCLUDES to + compilation. + (java): Remove INCLUDES and DEFS from compilation. + (lang_c_finish): Add DEFAULT_INCLUDES to compilation. + * compile.am (DEFS): Don't include %DEFAULT_INCLUDES%. + (DEFAULT_INCLUDES): New macro. + * automake.in (usage): Re-align explanatory text. Fixes PR automake/148. diff --git a/automake.in b/automake.in index fc0e8280..cc803ccf 100755 --- a/automake.in +++ b/automake.in @@ -752,7 +752,7 @@ register_language ('name' => 'c', 'ansi' => 1, 'autodep' => '', 'flags' => 'CFLAGS', - 'compile' => '$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)', + 'compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)', 'compiler' => 'COMPILE', 'output_arg' => '-c', 'extensions' => ['c'], @@ -761,7 +761,7 @@ register_language ('name' => 'cxx', 'linker' => 'CXXLINK', 'autodep' => 'CXX', 'flags' => 'CXXFLAGS', - 'compile' => '$(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)', + 'compile' => '$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)', 'compiler' => 'CXXCOMPILE', 'output_arg' => '-c -o $@', 'pure' => 1, @@ -771,7 +771,7 @@ register_language ('name' => 'objc', 'linker' => 'OBJCLINK', 'autodep' => 'OBJC', 'flags' => 'OBJCFLAGS', - 'compile' => '$(OBJC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)', + 'compile' => '$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)', 'compiler' => 'OBJCCOMPILE', 'output_arg' => '-c -o $@', 'pure' => 1, @@ -805,7 +805,7 @@ register_language ('name' => 'lexxx', register_language ('name' => 'asm', 'flags' => 'CFLAGS', # FIXME: asmflags? - 'compile' => '$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)', + 'compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)', # FIXME: a different compiler? 'compiler' => 'COMPILE', 'output_arg' => '-c', @@ -825,7 +825,7 @@ register_language ('name' => 'f77', register_language ('name' => 'ppf77', 'linker' => 'F77LINK', 'flags' => 'FFLAGS', - 'compile' => '$(F77) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)', + 'compile' => '$(F77) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)', 'compiler' => 'PPF77COMPILE', 'output_arg' => '-c -o $@', 'pure' => 1, @@ -846,7 +846,7 @@ register_language ('name' => 'ratfor', register_language ('name' => 'java', 'linker' => 'GCJLINK', 'flags' => 'GCJFLAGS', - 'compile' => '$(GCJ) $(DEFS) $(INCLUDES) $(AM_GCJFLAGS) $(GCJFLAGS)', + 'compile' => '$(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS)', 'compiler' => 'GCJCOMPILE', 'output_arg' => '-c -o $@', 'pure' => 1, @@ -4992,7 +4992,7 @@ sub lang_c_finish # we can't use $< -- some makes only define $< during a # suffix rule. $output_rules .= ($base . "_.c: $base.c \$(ANSI2KNR)\n\t" - . '$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) ' + . '$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) ' . '`if test -f $(srcdir)/' . $base . '.c' . '; then echo $(srcdir)/' . $base . '.c' . '; else echo ' . $base . '.c; fi` ' @@ -5171,7 +5171,7 @@ sub lang_f77_finish # Preprocessed Fortran 77 # # The current support for preprocessing Fortran 77 just involves passing -# `$(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)' as additional flags +# `$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)' as additional flags # to the Fortran 77 compiler, since this is how GNU Make does it; see # the `GNU Make Manual, Edition 0.51 for `make' Version 3.76 Beta' # (specifically, from info file `(make)Catalogue of Rules'). diff --git a/compile.am b/compile.am index 6f6909eb..63b3d474 100644 --- a/compile.am +++ b/compile.am @@ -17,7 +17,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -DEFS = @DEFS@%DEFAULT_INCLUDES% +DEFS = @DEFS@ +DEFAULT_INCLUDES = %DEFAULT_INCLUDES% CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ diff --git a/lib/am/compile.am b/lib/am/compile.am index 6f6909eb..63b3d474 100644 --- a/lib/am/compile.am +++ b/lib/am/compile.am @@ -17,7 +17,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -DEFS = @DEFS@%DEFAULT_INCLUDES% +DEFS = @DEFS@ +DEFAULT_INCLUDES = %DEFAULT_INCLUDES% CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@