From nik@nothing-going-on.demon.co.uk  Sat Feb 14 15:04:29 1998
Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA03523
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Feb 1998 15:04:19 -0800 (PST)
          (envelope-from nik@nothing-going-on.demon.co.uk)
Received: (from nik@localhost)
	by nothing-going-on.demon.co.uk (8.8.8/8.8.8) id RAA14702;
	Sat, 14 Feb 1998 17:31:53 GMT
	(envelope-from nik)
Message-Id: <199802141731.RAA14702@nothing-going-on.demon.co.uk>
Date: Sat, 14 Feb 1998 17:31:53 GMT
From: Nik Clayton <nik@nothing-going-on.demon.co.uk>
Reply-To: nik@nothing-going-on.demon.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] Add /usr/local/share/mk to default make(1) search path
X-Send-Pr-Version: 3.2

>Number:         5745
>Category:       bin
>Synopsis:       [patch] Add /usr/local/share/mk to default make(1) search path
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 14 15:10:01 PST 1998
>Closed-Date:    Sat Nov 07 03:44:36 UTC 2009
>Last-Modified:  Sat Nov 07 03:44:36 UTC 2009
>Originator:     Nik Clayton
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
Mildly disorganised
>Environment:

	2.2.5-stable

>Description:

	Makefiles can include other makefiles using the ".include" notation.
	When specifying the file to include using '<...>' notation, make(1)
	will look for the file in a 'system include directory'.

	Currently, that directory is set to '/usr/share/mk'. make(1) can
	handle multiple directories, but that functionality is not 
	currently used.

	I am working on some Makefiles that contain common functionality
	and will be used by multiple projects. I could either put these
	Makefile fragments into /usr/share/mk (which violates the 
	principle that local modifications should go somewhere under 
	/usr/local) or I could put them in /usr/local/share/mk and write
	my Makefiles to use

	    .include "/usr/local/share/mk/nik.fragment.mk"

	which seemed to be less clean than

	    .include <nik.fragment.mk>

        The enclosed (trivial) patch adds /usr/local/share/mk to the list 
	of paths in pathnames.h and updates the man page.

>How-To-Repeat:

	N/A

>Fix:
	
	Decide if my suggested change is appropriate, and apply the
	following patch:

Index: make.1
===================================================================
RCS file: /usr/local/cvs-reps/FreeBSD/src/usr.bin/make/make.1,v
retrieving revision 1.6.2.3
diff -c -r1.6.2.3 make.1
*** make.1	1997/09/15 09:20:40	1.6.2.3
--- make.1	1998/02/14 17:12:11
***************
*** 152,160 ****
  .It Fl m Ar directory
  Specify a directory in which to search for sys.mk and makefiles included
  via the <...> style.  Multiple directories can be added to form a search path.
! This path will override the default system include path: /usr/share/mk.
! Furthermore the system include path will be appended to the search path used
! for "..."-style inclusions (see the
  .Fl I
  option).
  .It Fl n
--- 152,160 ----
  .It Fl m Ar directory
  Specify a directory in which to search for sys.mk and makefiles included
  via the <...> style.  Multiple directories can be added to form a search path.
! This path will override the default system include paths: /usr/share/mk and
! /usr/local/share/mk.  Furthermore the system include path will be appended 
! to the search path used for "..."-style inclusions (see the
  .Fl I
  option).
  .It Fl n
***************
*** 951,956 ****
--- 951,958 ----
  system makefile
  .It /usr/share/mk
  system makefile directory
+ .It /usr/local/share/mk
+ system local makefile directory
  .It /usr/share/doc/psd/12.make
  PMake tutorial
  .El
Index: pathnames.h
===================================================================
RCS file: /usr/local/cvs-reps/FreeBSD/src/usr.bin/make/pathnames.h,v
retrieving revision 1.5
diff -c -r1.5 pathnames.h
*** pathnames.h	1996/10/06 02:34:36	1.5
--- pathnames.h	1998/02/14 17:09:39
***************
*** 38,41 ****
  #define	_PATH_OBJDIRPREFIX	"/usr/obj"
  #define	_PATH_DEFSHELLDIR	"/bin"
  #define	_PATH_DEFSYSMK		"sys.mk"
! #define	_PATH_DEFSYSPATH	"/usr/share/mk"
--- 38,41 ----
  #define	_PATH_OBJDIRPREFIX	"/usr/obj"
  #define	_PATH_DEFSHELLDIR	"/bin"
  #define	_PATH_DEFSYSMK		"sys.mk"
! #define	_PATH_DEFSYSPATH	"/usr/share/mk:/usr/local/share/mk"
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, nik@nothing-going-on.demon.co.uk
Cc:  Subject: Re: bin/5745: [PATCH] Add /usr/local/share/mk to default make(1) search path
Date: Sun, 15 Feb 1998 11:06:03 +1100

 >	When specifying the file to include using '<...>' notation, make(1)
 >	will look for the file in a 'system include directory'.
 >
 >	Currently, that directory is set to '/usr/share/mk'. make(1) can
 >	handle multiple directories, but that functionality is not 
 >	currently used.
 
 It's left to users to use it: `make -m your_system_include_dir', or put
 the flags in the MAKEFLAGS environment variable.  Is there a problem with
 the search order?
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Wed Feb 18 14:45:52 PST 1998 
State-Changed-Why:  
As Bruce pointed out the hooks are already in make(1) to do what 
the originator wants.  One should use the -m option to make(1) 
either on the commandline or in the MAKEFLAGS environment variable. 
State-Changed-From-To: closed->open 
State-Changed-By: steve 
State-Changed-When: Thu Feb 19 17:15:57 PST 1998 
State-Changed-Why:  
Bruce pointed out something to me that the originator wanted 
that the solutions already provided did not achieve.  Still 
working on an appropriate fix... 

From: Johan Karlsson <k@numeri.campus.luth.se>
To: steve@freebsd.org
Cc: nik@nothing-going-on.demon.co.uk,
	freebsd-gnats-submit@freebsd.org
Subject: Re: bin/5745: [PATCH] Add /usr/local/share/mk to default make(1) search path
Date: Mon, 14 Aug 2000 11:44:06 +0200

 Hi Steve
 
 In the audit-trail of this PR you mention that something that the originator
 asked for in make is not provided. 
 
 I do not understand what that is but maybe you remember :-)
 
 You also say "working on an appropriate fix..." is this the case and 
 may I assign this PR to you?
 
 /Johan K
 
Responsible-Changed-From-To: freebsd-bugs->nik 
Responsible-Changed-By: des 
Responsible-Changed-When: Mon Dec 3 16:28:00 PST 2001 
Responsible-Changed-Why:  
Nik is a big boy now, he can take care of his own PRs :) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=5745 
Responsible-Changed-From-To: nik->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Nov 12 15:08:56 UTC 2008 
Responsible-Changed-Why:  
nik has had his src bit taken for safekeeping. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=5745 

From: Alexander Best <alexbestms@math.uni-muenster.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/5745: [patch] Add /usr/local/share/mk to default make(1)
 search path
Date: Sat, 07 Nov 2009 04:11:00 +0100 (CET)

 taking into account that the originator had src commit rights for 7 years and
 most replies suggested to rather use the `make` -m option or set MAKEFLAGS i
 believe this pr can be set suspended (or even closed).
 
 alex
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Nov 7 03:42:39 UTC 2009 
State-Changed-Why:  
apparently the recommended fix was to either use make -m or set flags. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=5745 
>Unformatted:
