bugmake - Bugs: bug #27556, no rule to build target via vpath...

 
 

bug #27556: no rule to build target via vpath when jobserver is unavailable

Submitted by:  None
Submitted on:  Mon 28 Sep 2009 09:00:48 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 28 Sep 2009 09:00:48 PM UTC, original submission:

Building a target will fail with error:

      • No rule to make target

under the following conditions:

1) target source is in a directory other than "." and is included
via vpath.

2) parallel build is deactivated, warning is:

warning: jobserver unavailable: using -j1

Here's a sample set of files and a procedure to reproduce:

Files:

dir1/Makefile
dir1/build.sh
dir1/dir.mk
dir1/main.c
dir2/f.c

----------
Makefile:
----------

default:
@./build.sh

----------
build.sh:
----------

make -f dir.mk

----------
dir.mk:
----------

vpath %c ./:../dir2:

main: main.o f.o
$(CC) -o main $^

clean:
rm -f main.o f.o main

----------
main.c:
----------

main()
{
f();
}

----------
f.c:
----------

f()
{
return(0);
}

=========

When in dir1, "make -f dir.mk" is fine. So is "make -j2 dir.mk".
"make" alone is fine.

The failure is triggered with "make -j2" [-f Makefile].

make[1]: Entering directory `.../dir1'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
cc -c -o main.o main.c
make[1]: *** No rule to make target `f.o', needed by `main'. Stop.
make[1]: Leaving directory `.../dir1'
make: *** [default] Error 2

When parallel builds are deactivated, the rule to make the target is lost when vpath is involved.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup