tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building FILES?



On Sat, Oct 18, 2008 at 11:38:53PM +0200, Quentin Garnier wrote:
> Hi,
> 
> I came across the need of building FILES components in several
> occasions, for instance the pkgconfig files in X.Org.  In the end
> I did the installation part myself, only re-using the filesinstall
> macro from bsd.files.mk.
> 
> I have another use for it now, and I'd rather not do that again, but
> rather provide a way of building files installed by bsd.files.mk, and I
> came up with the following patch.
> 
> The bsd.prog.mk part fixes a bug with the way it handles CLEANFILES;  if
> the original Makefile didn't set CLEANFILES, the target is created
> empty, and any further addition to CLEANFILES won't do what you expect.
> There might be better ways to fix that one, adding a if in the shell
> code for instance.
> 
> Opinions?  The reason I need it is to do substitutions in the rc.d
> scripts for xdm and xfs, which include the path to the X11 distribution.


> +cleanextra: .PHONY
> +.if defined(CLEANFILES) && !empty(CLEANFILES)
> +     rm -f ${CLEANFILES}
> +.endif

Not sure that the .if should survive:

http://mail-index.netbsd.org/tech-toolchain/2008/06/27/msg000237.html
http://mail-index.netbsd.org/tech-toolchain/2008/05/21/msg000199.html
http://mail-index.netbsd.org/tech-toolchain/2008/05/21/msg000200.html


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index