Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jul 2000 18:49:29 +0100
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
To:        cjclark@alum.mit.edu
Cc:        David Banning <sky_tracker@yahoo.com>, questions@freebsd.org
Subject:   Re: question about makefiles
Message-ID:  <20000709184929.B233@parish>
In-Reply-To: <20000624130808.B256@dialin-client.earthlink.net>; from cristjc@earthlink.net on Sat, Jun 24, 2000 at 01:08:09PM -0700
References:  <3954FC28.65C7DD21@yahoo.com> <20000624192639.G233@parish> <20000624130808.B256@dialin-client.earthlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 </etc/make.conf.local>
    .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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000709184929.B233>