Hi,

The top-level Makefile does this:

all: mkdir-init local-all

Where mkdir-init creates the directory structure in the build tree, and 
local-all actually compiles.

Normally, GNU Make will run mkdir-init first and then local-all, so the build 
tree directories are created and then the code compiled.  However, the 
dependency list is not ordered list, and passing —shuffle to make (new in GNU 
Make 4.4, I believe) will cause it to re-order the lists randomly, which 
results in the code being compiled _before_ the directories to contain the 
objects have been created.

I’m working around this by changing the all: target as follows:

all: mkdir-init
    $(MAKE) local-all

Which is pretty ugly and only solves the problem for people calling `make` or 
`make all` directly.  Someone doing out-of-tree builds and invoking `make 
fsmod-lib` from a clean build tree would still have failures.

A better solution would be to move the mkdir from a top-level target to 
explicitly inside each target.

Cheers
Ross
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

Reply via email to