2001-05-06 Tom Tromey <tromey@redhat.com>
+ 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.
'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'],
'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,
'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,
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',
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,
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,
# 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` '
# 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').