Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 1998 17:31:53 GMT
From:      Nik Clayton <nik@nothing-going-on.demon.co.uk>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/5745: [PATCH] Add /usr/local/share/mk to default make(1) search path
Message-ID:  <199802141731.RAA14702@nothing-going-on.demon.co.uk>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 14 15:10:01 PST 1998
>Last-Modified:
>Originator:     Nik Clayton
>Organization:
Mildly disorganised
>Release:        FreeBSD 2.2.5-STABLE i386
>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"
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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