bugmake - Bugs: bug #107, Make fails when it could re-exec,...

 
 

bug #107: Make fails when it could re-exec, and then succeed.

Submitter:  Paul D. Smith <psmith>
Submitted:  Sat 20 Apr 2002 08:49:09 PM UTC
   
 
Severity:  1 - Wish Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  3.79 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Nov 2011 02:33:52 PM UTC, comment #2: 

Just to point out this works fine if you tell make to ignore errors during builds using "-include":


~$ cat /tmp/foo.mk
there: hi ; @echo there
a.mk: ; echo 'b.mk: ; echo "hi: ; @echo hi" > $$@' > $@
-include a.mk
-include b.mk

~$ ./src/make/make-rel/make -f /tmp/foo.mk
echo 'b.mk: ; echo "hi: ; @echo hi" > $@' > a.mk
echo "hi: ; @echo hi" > b.mk
hi
there


Not saying this is a perfect solution but it does work.

Paul D. Smith <psmith>
Group administrator
  Spam posted by sevanath
Sat 20 Apr 2002 08:49:09 PM UTC, original submission:  

If a makefile "include"s another makefile that doesn't exist and which make doesn't know how to create, make fails.  This is normally correct.

However, say there are two "include"d files, both of which are generated.  Say make knows how to build the first one, and the contents of the first one will include instructions on how to build the second one.

In this case, make still fails although it could succeed, by building the first file, then re-execing itself, whereupon it would know how to build the second one.

Repeat by:

$ cat Makefile
there: hi ; @echo there
a.mk: ; echo 'b.mk: ; echo "hi: ; @echo hi" > $$@' > $@
include a.mk
include b.mk

$ make
Makefile:3: a.mk: No such file or directory
Makefile:4: b.mk: No such file or directory
make: * No rule to make target `b.mk'.  Stop.

Reported via GNATS by Dima Barsky <dima@debian.org>

Paul D. Smith <psmith>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by sevanath (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code