[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Where to put common Makefile code
From:       Julio Merino <julio () meroh ! net>
Date:       2014-01-12 22:41:33
Message-ID: 2FA79428-C0DD-4B19-890B-D537F992D7F0 () meroh ! net
[Download RAW message or body]

On Jan 12, 2014, at 15:43, Dimitry Andric <dim@FreeBSD.org> wrote:

> On 12 Jan 2014, at 11:25, Julio Merino <julio@meroh.net> wrote:
> > 
> > I have some common Makefile boilerplate code for both lib/atf/ and
> > usr.bin/atf/ that I'm unsure about where to best put it.
> > 
> > The code in question is the definition of a set of useful variables
> > and target rules that can be depended on where necessary to, e.g.
> > obtain atf's version number from the files in contrib/atf/
> > 
> > The fragment is not "long enough" to be a big deal if it were
> > duplicated in 3 different Makefiles, but obviously I'd prefer to avoid
> > the copy/paste.
> > 
> > So where would you put this?
> 
> For an example (admittedly not the most elegant, but it works), have a
> look at lib/clang/clang.build.mk, which contains the common make-related
> bits for clang and llvm.  This is included by the clang and llvm
> libraries (which live under lib/clang) via lib/clang/clang.lib.mk, and
> by the clang and llvm programs (which live under usr.bin/clang) via
> usr.bin/clang/clang.prog.mk.

OK, so because there was prior art in just adding a file to the corresponding lib/ \
subdirectory and using it outside of lib/, I went ahead and did it.

Thanks!
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic