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)



On Dec 14, 12:51pm, uebayasi%tombi.co.jp@localhost (Masao Uebayashi) wrote:
-- Subject: Re: make rule of multiple file generation (was Re: CVS commit: sr

| On Mon, Dec 14, 2009 at 12:38:06PM +0900, enami tsugutomo wrote:
| > > So this is fixed with an additional dependency to force serialization,
| > > or by fixing the script not to re-use the same temp filenames:
| > > 
| > > nodes.h: nodes.c
| > > nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
| > >         ${_MKTARGET_CREATE}
| > >   ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC:S/^nodes.c$//} ${.OBJDIR}
| > >   [ -f nodes.h ]
| > 
| > This ugly :S/^nodes.c$// modifier can be avoided by using .ORDER to
| > force serialization, can't it?
| 
| I've never known ".ORDER".  This works for me:
| 
|       .ORDER: nodes.h nodes.c
| 
|       nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
|               ${_MKTARGET_CREATE}
|               ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
| 

Yes, .ORDER is better. I wrote the .ORDER parser and I forgot about the
option to make it a target :-)

I tried:

nodes.c .ORDER nodes.h: mknodes.sh nodetypes nodes.c.pat

and of course it did not work.

christos


Home | Main Index | Thread Index | Old Index