From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 18 22:13:23 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02F3F16A4CE for ; Thu, 18 Dec 2003 22:13:23 -0800 (PST) Received: from april.chuckr.org (april.chuckr.org [66.92.151.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6A9143D39 for ; Thu, 18 Dec 2003 22:13:21 -0800 (PST) (envelope-from chuckr@chuckr.org) Received: from chuckr.org (may.chuckr.org [66.92.151.44]) by april.chuckr.org (Postfix) with ESMTP id 66CF111FF2; Fri, 19 Dec 2003 00:48:45 -0500 (EST) Message-ID: <3FE29700.5060505@chuckr.org> Date: Fri, 19 Dec 2003 01:13:20 -0500 From: chuckr User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030902 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Langille References: <3FE20A5C.2872.92C92363@localhost> In-Reply-To: <3FE20A5C.2872.92C92363@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: optionally include file within a Makefile X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 06:13:23 -0000 Dan Langille wrote: >On 18 Dec 2003 at 19:02, Dan Langille wrote: > > > >>My goal is provide a way to override values in a Makefile with values >>from a local config file. >> >> > >I'm getting further. What's the proper way to do an include? > >[dan@polo:~] $ cat Makefile >A?="things" > >all: > @echo A is $A > if [ -r ${HOME}/.bacula-regress ] ; then \ > echo loading tha file; \ > .include "${HOME}/.bacula-regress" ; \ > fi > > @echo A is $A >[dan@polo:~] $ cat .bacula-regress >BACULA_SOURCE="${HOME}/src/bacula-cvs" >EMAIL=dan+bacula@langille.org >AUTOCHANGER="/dev/null" > >A="stuff" >echo yes, we have stuff here. >[dan@polo:~] $ make >A is things >if [ -r /home/dan/.bacula-regress ] ; then echo loading tha file; >.include "/home/dan/.bacula-regress" ; fi >loading tha file >.include: not found >*** Error code 127 > > .if exists(your filename, relative to /usr/share/mk) .include or include (not documented, but it works, abs path) .endif >Stop in /usr/home/dan. >[dan@polo:~] $ > >