tech-userlevel archive

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

Re: Building FILES?



On Sun, 19 Oct 2008, Quentin Garnier wrote:
> On Sun, Oct 19, 2008 at 09:28:48AM +0200, Alan Barrett wrote:
> > On Sun, 19 Oct 2008, Quentin Garnier wrote:
> > > > Please could you give an example of how to use this.
> > > 
> > > FILES=                    tralala
> > > FILESBUILD_tralala=       yes
> > 
> > Sorry, I still don't get it.  What will this actually do?
> 
> Have you looked at the patch?  It will add "tralala" to the list of
> targets to make at realall time, and avoid making it .MADE at install
> time.

Yes, I looked at the patch.  Obviously your example above is incomplete,
it also needs

        tralala: some dependency 
                some code here

> > How do you tell it *how* to build the file?
> 
> Well duh, this is make, you provide a target for it.  In my use it will
> be a .in suffix rule, but it can be something else.

It previously wasn't clear to me that you didn't intend some magic
to happen without needing explicit targets.

> > Why use a bunch of variables all set to yes, instead of a single
> > variable with a list of file names?
> 
> I could do it that way too.  Obviously there is rather limited use for
> it in our tree (although I'd suspect there is a number of local versions
> to work around the limitations, but I haven't cheked), so I though just
> a modifier to FILES could be enough.

Fair enough, adding a new variable for a list of files to be made would
be more difficult than what you have done, and your way works.

> > Also, it's conventional to use ".", not "_", in the variable name:
> > 
> >     FILESBUILD.tralala = yes
> 
> My original question assumed you had knowledge of how to use
> bsd.files.mk, at least, because the underscore is used there.

There's no need to be insulting.  Forgetting that bsd.files.mk uses "_"
instead of the conventional "." doesn't mean that I don't know how to
use bsd.files.mk.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index