Re: How to build kernel module spread on subdirectories?

2008-12-02 Thread Nikola Knežević
On 2 Dec 2008, at 13:33 , Dag-Erling Smørgrav wrote: [EMAIL PROTECTED] writes: Provided the module in question is contemplated for delivery as a port, rather than as part of the base -- so that having a build dependency on a port is tolerable -- perhaps it would be more easily built using deve

Re: How to build kernel module spread on subdirectories?

2008-12-02 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] writes: > Provided the module in question is contemplated for delivery > as a port, rather than as part of the base -- so that having a build > dependency on a port is tolerable -- perhaps it would be more easily > built using devel/gmake? You'd have to reproduce most of /usr/s

Re: How to build kernel module spread on subdirectories?

2008-12-01 Thread perryh
> As you discovered, includes are done before targets. You would > need seperate invocations of make, to generate the file and get > it included. Provided the module in question is contemplated for delivery as a port, rather than as part of the base -- so that having a build dependency on a port

Re: How to build kernel module spread on subdirectories?

2008-12-01 Thread Mel
On Monday 01 December 2008 12:08:13 Nikola Knežević wrote: > On 1 Dec 2008, at 01:22 , Tim Kientzle wrote: > >> .MAKEFILEDEPS: elements.mk > >> .sinclude "elements.mk" > >> .include > >> --->8--- > >> When I run make depend, it only includes SRCSs from BSDmakefile, > >> not those from elements.mk

Re: How to build kernel module spread on subdirectories?

2008-12-01 Thread Nikola Knežević
On 1 Dec 2008, at 01:22 , Tim Kientzle wrote: .MAKEFILEDEPS: elements.mk .sinclude "elements.mk" .include --->8--- When I run make depend, it only includes SRCSs from BSDmakefile, not those from elements.mk. I would try adding a "beforedepend" requirement: beforedepend: elements.mk Look

Re: How to build kernel module spread on subdirectories?

2008-11-30 Thread Tim Kientzle
Nikola Knežević wrote: As I described in my initial mail, I have to use two makefiles. One is the main Makefile, while the other has to be generated. In the generated .mk, I add to the SRCS, and I create the .PATH target with other (necessary) directories. Unfortunately, make depend doesn't

Re: How to build kernel module spread on subdirectories?

2008-11-30 Thread Nikola Knežević
On 30 Nov 2008, at 18:43 , Mel wrote: since there were no replies, I went into the various .mk's, and I found some inconsistencies when building modules. If you have a file in a different directory, below the directory where you BSDmakefile is, objects won't be linked nor cleaned properly. The

Re: How to build kernel module spread on subdirectories?

2008-11-30 Thread Mel
On Saturday 29 November 2008 12:40:47 Nikola Knežević wrote: > On 25 Nov 2008, at 15:20 , Nikola Knežević wrote: > > I tried to move from OBJS into SRCS (main BSDmakefile now has: SRCS+= > > $(ELEMENT_SRCS)), by using something like: > > # subdir0 > > ELEMENT_SRCS__x =\ > > subdir1/file0.cc \ > > s

Re: How to build kernel module spread on subdirectories?

2008-11-29 Thread Nikola Knežević
On 25 Nov 2008, at 15:20 , Nikola Knežević wrote: I tried to move from OBJS into SRCS (main BSDmakefile now has: SRCS+= $(ELEMENT_SRCS)), by using something like: # subdir0 ELEMENT_SRCS__x =\ subdir1/file0.cc \ subdir1/file1.cc ... But this fails during the linking phase, because the linker is

How to build kernel module spread on subdirectories?

2008-11-25 Thread Nikola Knežević
Hi, I'm playing with the Click Modular router on my FreeBSD box. Out of curiosity, I decided to switch its GNU makefile to BSD style. I managed to do it, but I would like to polish it a bit more (and learn some things along). Old GNUmakefile relies heavily on OBJS and *_OBJS, as it fills