From owner-freebsd-questions Sun Jul 9 10:49:38 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta02-svc.ntlworld.com (mta02-svc.ntlworld.com [62.253.162.42]) by hub.freebsd.org (Postfix) with ESMTP id B692937B53A for ; Sun, 9 Jul 2000 10:49:34 -0700 (PDT) (envelope-from mark@ukug.uk.freebsd.org) Received: from parish.my.domain ([62.253.89.255]) by mta02-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20000709184854.EEGH3760.mta02-svc.ntlworld.com@parish.my.domain>; Sun, 9 Jul 2000 18:48:54 +0000 Received: (from mark@localhost) by parish.my.domain (8.9.3/8.9.3) id SAA02509; Sun, 9 Jul 2000 18:49:29 +0100 (BST) (envelope-from mark) Date: Sun, 9 Jul 2000 18:49:29 +0100 From: Mark Ovens To: cjclark@alum.mit.edu Cc: David Banning , questions@freebsd.org Subject: Re: question about makefiles Message-ID: <20000709184929.B233@parish> References: <3954FC28.65C7DD21@yahoo.com> <20000624192639.G233@parish> <20000624130808.B256@dialin-client.earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000624130808.B256@dialin-client.earthlink.net>; from cristjc@earthlink.net on Sat, Jun 24, 2000 at 01:08:09PM -0700 Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jun 24, 2000 at 01:08:09PM -0700, Crist J. Clark wrote: > On Sat, Jun 24, 2000 at 07:26:39PM +0100, Mark Ovens wrote: > > On Sat, Jun 24, 2000 at 02:21:28PM -0400, David Banning wrote: > > > > > > I have a general question about Makefiles. > > > > > > I see Makefile variables defined near the beginning of the file, > > > however > > > some variables used are seemingly not defined. > > > > > > a simple Makefile line says; > > > > > > @${PATCH} -s ${PREFIX}/Office51/bin/setup ${FILESDIR}/setup.patch > > > > > > PATCH, PREFIX and FILESDIR all are used, but not defined in Makefile. > > > > > > So where do they get defined? > > > > > > > /etc/make.conf and, for ports, /usr/ports/Mk/bsd.port.mk > > Don't forget, > > /usr/share/mk/sys.mk > /etc/defaults/make.conf > /etc/make.conf.local > /usr/share/mk/bsd.own.mk > /etc/objformat > > How it works (I believe) is that /usr/share/mk/sys.mk is sourced > initially for all make(1)s. If you look at that file, it is the > one including, > > /etc/defaults/make.conf > /etc/make.conf > /etc/make.conf.local > /usr/share/mk/bsd.own.mk > Sorry to drag up an old thread but, based on the info above, I created /etc/make.conf.local to stick a load of personal settings in. On running make(1) to build the docs I got: parish# make DESTDIR=/usr/local/www/data "/usr/share/mk/sys.mk", line 248: Error, original /etc/make.conf should be moved to the /etc/defaults/ directory and /etc/make.conf.local should be renamed to /etc/make.conf. The lines in /usr/share/mk/sys.mk that produced this are: .if exists(/etc/make.conf.local) .error Error, original /etc/make.conf should be moved to the /etc/defaults/ directory and /etc/make.conf.local should be renamed to /etc/make.conf. .include .endif Looking in /usr/src/etc it appears that make.conf now works like /etc/rc.conf, i.e. the base file (the one that shouldn't be edited) is in /etc/defaults and your local mods go in /etc/{rc,make}.conf. > And that last one in turn also sucks up, > > /etc/objformat > > Now for ports, you will notice that the Makefiles have .include's of > their own which end up getting the files in /usr/ports/Mk as Mark > pointed out. > > It all makes perfect sense... eventually. > -- > Crist J. Clark cjclark@alum.mit.edu > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- If I buy a copy of WinDelete, and it doesn't delete Windows, am I entitled to my money back? ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message