Hello GNU Make maintainers, I may have found the following statement from make.info to be false:
> How Makefiles Are Remade > ======================== > > Sometimes makefiles can be remade from other files, such as RCS or > SCCS files. If a makefile can be remade from other files, you probably > want `make' to get an up-to-date version of the makefile to read in. > > To this end, after reading in all makefiles, `make' will consider > each as a goal target and attempt to update it. If a makefile has a > rule which says how to update it (found either in that very makefile or > in another one) or if an implicit rule applies to it (*note Using > Implicit Rules: Implicit Rules.), it will be updated if necessary. > After all makefiles have been checked, if any have actually been > changed, `make' starts with a clean slate and reads all the makefiles > over again. (It will also attempt to update each of them over again, > but normally this will not change them again, since they are already up > to date.) A makefile including another built-on-the-fly makefile fails to properly remake this included makefile up to its final contents, at least under Linux RedHat 7.3 and Fedora Core 1 with any GNU make version 3.79.1, 3.80 and 3.81beta3 (Solaris 2.6 with GNU make 3.80 was found to be OK). Attached Makefile demonstrates this problem: code is written in such a way that it takes 3 additional make internal runs to build included makefile, but it will take at least two "make" runs to complete included makefile under Linux. Intermediate included Makefile contents saved for understanding. Simply run "make" and follow instructions to exercize test-case. Attached files: - Makefile: (self-explanatory) code to demonstrate the bug - Makefile.dep-expected: expected included makefile when complete Only Linux RedHat 7.3 (i686), Fedora Core 1 (i686) and Solaris 2.6 (sparc) have been tested against this testcase. Other platforms need to be tested, but I don't have them at hand so volunteers are welcome! Can someone confirm this is a bug, not a "feature"? Please ask in case more details/explanations are needed. Thibaud PS: I have already submitted bug #13952 under Savannah, sorry for any potential duplicate.
Makefile
Description: Binary data
Makefile.dep-expected
Description: Binary data
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make