Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 2000 13:08:09 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Mark Ovens <mark@dogma.freebsd-uk.eu.org>
Cc:        David Banning <sky_tracker@yahoo.com>, questions@FreeBSD.ORG
Subject:   Re: question about makefiles
Message-ID:  <20000624130808.B256@dialin-client.earthlink.net>
In-Reply-To: <20000624192639.G233@parish>; from mark@dogma.freebsd-uk.eu.org on Sat, Jun 24, 2000 at 07:26:39PM %2B0100
References:  <3954FC28.65C7DD21@yahoo.com> <20000624192639.G233@parish>

next in thread | previous in thread | raw e-mail | index | archive | help
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

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




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