bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fatal errors for missing include files.


From: Ian Dunbar
Subject: Re: fatal errors for missing include files.
Date: Tue, 31 Aug 2004 09:45:00 +0000

Hi Paul,

Thanks for the clarification. I have still some questions though.

From: "Paul D. Smith" <address@hidden>

  id> It would know that the order of making up to date has to be:
  id> Makefile, sub.mk, subsub.mk, subsubsub.mk, etc., because if sub.mk
  id> is out of date, there is no guarentee that the soon to be updated
  id> version will include the same files as before.

Ah.  There is an even deeper misunderstanding here.

Note that when remaking makefiles, make does _NOT_ proceed like this:

Ok, but I am surprised you don't you see any problem (bug) with the current way?

This doesn't matter though: remaking sub.mk in no way changes the rules,
variables, etc. that make knows about because the makefile is not
re-read immediately after it's created.  So, if there were no rules to
build that target before sub.mk was rebuilt, there cannot be any
afterwards either.

I don't really understand why does adding the order only-prerequsite like this solve the problem, if make truly does not re-read the makefiles between remaking them?

subsub.mk: | sub.mk
include subsub.mk

From my understanding, all that says is that you should build sub.mk before
subsub.mk. By your rule of rebuilding everything first, make should still attempt and fail (fatally because we are past the no-fatal-errors stage mentioned previously) to make subsub.mk. However, it gives the same warning for "subsub.mk", but this time it's non-fatal.

Original way:
sub.mk:1: subsub.mk: No such file or directory
make: *** No rule to make target `subsub.mk'.  Stop.

With order-only:
sub.mk:2: subsub.mk: No such file or directory
cp sub.prj sub.mk
make: Nothing to be done for `default'.

Why is this? In both ways, sub.mk is out of date, and subsub.mk can't be made?

Best regards,
Ian

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail





reply via email to

[Prev in Thread] Current Thread [Next in Thread]