tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make rule of multiple file generation (was Re: CVS commit: src/share/mk)
> This has nothing to do with yacc; the rules in that Makefile are wrong.
>
> instead of:
>
> nodes.h: nodes.c
> nodes.c: mknodes.sh nodetypes nodes.c.pat
>
> it should be:
>
> nodes.h nodes.c: mknodes.sh nodetypes nodes.c.pat
% /src/netbsd/work.TNF/landisk/tools/bin/nbmake-landisk -j 2 nodes.h
nodes.c
create sh/nodes.c
create sh/nodes.h
mv: rename /src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h.tmp to
/src/netbsd/work.TNF/landisk/obj/bin/sh/nodes.h: No such file or directory
--- nodes.h ---
*** [nodes.h] Error code 1
1 error
nbmake: stopped in /src/netbsd/src.TNF/bin/sh
"a b: c" doesn't describe a 1-to-N generation, but just a syntax sugar of
"a: c" and "b: c". make(1) tries to build a and b in two jobs and gets
confused.
You'll realize what $GENCMD does is a solution, not a work-around.
Masao
--
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
Home |
Main Index |
Thread Index |
Old Index