tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: bsd.lib.mk question
> > SRCS= a.c b.c
> >
> > a.c b.c:
> > echo 'int foo;' > ${.TARGET}
>
> > If you run that, you will see two calls for echo.
>
> But your commands don't (well, your command doesn't) build two files;
> it builds only one. Naturally make has to run it again for the other.
>
> Try, instead,
>
> a.c b.c:
> echo 'int foo;' > a.c
> echo 'int foo;' > b.c
>
> You'll find - well, I find, at least - that it runs the command set
> only once.
make -j is the problem. eg:
xotica ~> make -f a.mk -j10 b.c a.c
--- b.c ---
--- a.c ---
--- b.c ---
echo 'int foo;' > a.c
--- a.c ---
echo 'int foo;' > a.c
--- b.c ---
echo 'int foo;' > b.c
--- a.c ---
echo 'int foo;' > b.c
.mrg.
Home |
Main Index |
Thread Index |
Old Index