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/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make