From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 18 17:13:19 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 F3E0A16A4CE for ; Thu, 18 Dec 2003 17:13:18 -0800 (PST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08DAA43D39 for ; Thu, 18 Dec 2003 17:13:18 -0800 (PST) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 0F32C3D34 for ; Thu, 18 Dec 2003 20:13:17 -0500 (EST) From: "Dan Langille" To: freebsd-hackers@freebsd.org Date: Thu, 18 Dec 2003 20:13:16 -0500 MIME-Version: 1.0 Message-ID: <3FE20A5C.2872.92C92363@localhost> Priority: normal In-reply-to: <3FE1F9CB.6075.928869EF@localhost> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body 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 01:13:19 -0000 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 Stop in /usr/home/dan. [dan@polo:~] $ -- Dan Langille : http://www.langille.org/