[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make -j with recursive make problems
From: |
mst |
Subject: |
make -j with recursive make problems |
Date: |
Sun, 24 Nov 2002 08:49:02 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826 |
Hello!
I have encountered a problem with make -j (parallel make)
when I use recursive make rules.
Sometimes make seems to start building a target before all
the prerequisites have been built.
I have something like this:
in src/tc/Makefile
../boot2/%: always
${MAKE} -C ../boot2 $(notdir $@)
.PHONY: always
init_cmd_if.o: ../boot2/sysdis_c.c
In addition there's a usual rule for C:
%.o: %.c
$(CC) $(CFLAGS) -o $@ $<
And in another directory I launch this make with a recursive
rule:
src/tc/tcu.exe: always
$(MAKE) -C $(dir $@) $(notdir $@)
However, I noticed that when make -j was used,
sometimes make will try to build init_cmd_if.o from .c
after make for sysdis_c.c started but without waiting for
it to finish.
Shouldn't all prerequisites be built before the target build is started?
make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Thanks,
MST
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- make -j with recursive make problems,
mst <=