Hi, the documentation for implicit rules says for compiling C/C++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
but the source says default.c:479: "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", default.c:483: "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", the attached patch fixes the documentation for these two rules. also $(CPPFLAGS) and $(CFLAGS) are swapped (should not be an issue in most cases). I think there are more rules that use $(TARGET_ARCH) without being mentioned in the docs. Regards, Dominik
diff --git a/doc/make.texi b/doc/make.texi index d1ceefb..b92bec4 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -9055,7 +9055,7 @@ for full details on suffix rules. @pindex .o @pindex .c @file{@var{n}.o} is made automatically from @file{@var{n}.c} with -a recipe of the form @samp{$(CC) $(CPPFLAGS) $(CFLAGS) -c}.@refill +a recipe of the form @samp{$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c}.@refill @item Compiling C++ programs @cindex C++, rule to compile @@ -9065,7 +9065,7 @@ a recipe of the form @samp{$(CC) $(CPPFLAGS) $(CFLAGS) -c}.@refill @pindex .C @file{@var{n}.o} is made automatically from @file{@var{n}.cc}, @file{@var{n}.cpp}, or @file{@var{n}.C} with a recipe of the form -@samp{$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c}. We encourage you to use the +@samp{$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c}. We encourage you to use the suffix @samp{.cc} for C++ source files instead of @samp{.C}.@refill @item Compiling Pascal programs
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make