Hello, I was trying to make a Makefile which would work on all POSIX compliant make implementations, when I noticed a difference in behaviour between GNU make and other make implementations. The difference is in the .c.o inference rule.
So I checked the POSIX specifications. The POSIX standard (or at least the 2004 version) specifies that the rule for .c.o: should be $(CC) $(CFLAGS) -c $< The default GNU make rule is (obtained through the -p option) $(COMPILE.c) $(OUTPUT_OPTION) $< Note the $(OUTPUT_OPTION) which gets set to -o [EMAIL PROTECTED] This is fine (and most probably what you want). But when the .POSIX: target is included as the first non-comment line of the Makefile, the POSIX standard specifies that a standards compliant implementation should not have any non-compatible extensions. However, even when I include .POSIX: as the first line of my Makefile, the inference rule is unchanged and still includes the output option. From my reading of the standard I conclude that this is a minor POSIX compliance bug. I checked both versions 3.80 and the current CVS version, and both have the same behaviour. I hope this report is helpful. Regards, G. Halkes _______________________________________________ Bug-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-make
