Subject: Re: CVS commit: basesrc
To: Antti Kantee <>
From: Simon J. Gerraty <>
List: tech-userlevel
Date: 03/28/2001 10:35:20
>New file(1) uses file -C to compile the magic database into a more
>efficient format. We therefore need both host & target binaries, the
>first to compile the magic database with and the latter for normal

I'd look at doing something like this:


host-${PROG}:	${OBJS:S,.o,.lo,}
	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC}

generated-file:	${HOST_PROG}
	${.OBJDIR}/${HOST_PROG} ...

We (netbsd) have a but in my build at work I found it more 
convenient to include the handling of .lo and HOST_LINK.c etc 
in the normal *.mk

>Well, the real fun part is of course that we'd actually need to run the
>_target_ file binary to create a compiled database which is usable on
>the target.

That would be a bug in the design :-)