From owner-freebsd-bugs Sat Feb 14 15:10:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA04231 for freebsd-bugs-outgoing; Sat, 14 Feb 1998 15:10:05 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA04214; Sat, 14 Feb 1998 15:10:03 -0800 (PST) (envelope-from gnats) 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 ; 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 Reply-To: nik@nothing-going-on.demon.co.uk To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/5745: [PATCH] Add /usr/local/share/mk to default make(1) search path Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 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