From owner-freebsd-questions@FreeBSD.ORG Tue Feb 8 04:52:33 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 496F016A4CE for ; Tue, 8 Feb 2005 04:52:33 +0000 (GMT) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70C1D43D31 for ; Tue, 8 Feb 2005 04:52:32 +0000 (GMT) (envelope-from keramida@hellug.gr) Received: from igloo.linux.gr (localhost [127.0.0.1])j184r4qJ025245; Tue, 8 Feb 2005 06:53:07 +0200 Received: (from keramida@localhost) by igloo.linux.gr (8.13.2/8.13.2/Submit) id j184r3t2025242; Tue, 8 Feb 2005 06:53:03 +0200 X-Authentication-Warning: igloo.linux.gr: keramida set sender to keramida@linux.gr using -f Date: Tue, 8 Feb 2005 06:53:03 +0200 From: Giorgos Keramidas To: Jonathon McKitrick Message-ID: <20050208045303.GA24803@igloo.linux.gr> References: <20050205142225.GA11546@dogma.freebsd-uk.eu.org> <44u0oqylar.fsf@be-well.ilk.org> <20050205172727.GA26430@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050205172727.GA26430@dogma.freebsd-uk.eu.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-5.899, required 5, autolearn=not spam, ALL_TRUSTED -3.30, BAYES_00 -2.60) X-MailScanner-From: keramida@linux.gr cc: freebsd-questions@freebsd.org Subject: Re: Example BSD Makefiles *outside* the src tree?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 04:52:33 -0000 On 2005-02-05 17:27, Jonathon McKitrick wrote: >On Sat, Feb 05, 2005 at 12:21:48PM -0500, Lowell Gilbert wrote: >>Jonathon McKitrick writes: >>> does anyone know of any project out there I could get my hands on >>> that use BSD make? Obviously the src tree is not a good place to >>> learn the basics, but most makefiles I run across are for GNU make >>> and/or are too complex to learn the basics from. >> >> There are many examples in the Tutorial, which I think you said (in >> another message) that you had already read. What are you looking >> for that isn't in those examples? > > Setting up basic recursion (I can do it, but not the right way). > Building library sonames and installing them correctly. Recursion should be as easy as: % cd /proj/foo % cat Makefile SUBDIR= alpha \ beta .include % The Makefile files of /proj/foo/alpha and /proj/foo/beta will then be 'called' recursively to build the respective module parts. Note that the files: /proj/foo/alpha/Makefile /proj/foo/beta/Makefile will pull in any Makefile.inc you put in /proj/foo (yes, that is one level higher than the Makefiles of the subdirs themselves). This may seem counter-intuitive at first, but it makes sense if you consider the common Makefile.inc include file as "things common to all the subdirs of /proj/foo". Examples of this sort can be found in abundance in src/. Just look at the Makefile for src/bin/, src/usr.bin/, etc. > Doing the above in a makefile that will run under GNU make. I don't use gmake if I can avoid it. Someone else should chime in with gmake help, if they want.