bug-make
[Top][All Lists]
Advanced

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

[bug #27556] no rule to build target via vpath when jobserver is unavail


From: anonymous
Subject: [bug #27556] no rule to build target via vpath when jobserver is unavailable
Date: Mon, 28 Sep 2009 21:00:51 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.14) Gecko/2009090217 Ubuntu/9.04 (jaunty) Firefox/3.0.14

URL:
  <http://savannah.gnu.org/bugs/?27556>

                 Summary: no rule to build target via vpath when jobserver is
unavailable
                 Project: make
            Submitted by: None
            Submitted on: Mon 28 Sep 2009 09:00:48 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27556>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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