Subject: pkg/21235: mk/defs.Linux.mk change /bin/touch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 04/19/2003 12:15:14
>Number:         21235
>Category:       pkg
>Synopsis:       mk/defs.Linux.mk says /bin/touch but not FHS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 19 19:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Please consider following patch because touch(1) is not
in /bin according to Filesystem Hierarchy Standard
which some Linuxes use.

Also, I did same for cut and nice. They aren't in FHS for
/bin either.

I see this was already done for sort and greps.
But I see some use .elif 
Why do some only define if it exists and some
always define?

>How-To-Repeat:
>Fix:

Index: mk/defs.Linux.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defs.Linux.mk,v
retrieving revision 1.50
diff -b -u -r1.50 defs.Linux.mk
--- mk/defs.Linux.mk	2003/04/15 05:29:47	1.50
+++ mk/defs.Linux.mk	2003/04/19 19:12:32
@@ -14,7 +14,11 @@
 CHGRP?=		/bin/chgrp
 CMP?=		cmp
 CP?=		/bin/cp
+.if exists(/bin/cut)
 CUT?=		/bin/cut
+.else
+CUT?=		/usr/bin/cut
+.endif
 DATE?=		/bin/date
 DC?=		/usr/bin/dc
 DIRNAME?=	/usr/bin/dirname
@@ -54,7 +58,11 @@
 MKDIR?=		/bin/mkdir -p
 MTREE?=		${ZOULARISBASE}/sbin/mtree
 MV?=		/bin/mv
+.if exists(/bin/nice)
 NICE?=		/bin/nice
+.else
+NICE?=		/usr/bin/nice
+.endif
 PATCH?=		/usr/bin/patch
 PAX?=		${ZOULARISBASE}/bin/pax
 PERL5?=		${LOCALBASE}/bin/perl
@@ -80,7 +88,11 @@
 TAIL?=		/usr/bin/tail
 TEE?=		/usr/bin/tee
 TEST?=		/usr/bin/test
+.if exists(/bin/touch)
 TOUCH?=		/bin/touch
+.else
+TOUCH?=         /usr/bin/touch
+.endif
 TR?=		/usr/bin/tr
 TRUE?=		/bin/true
 TSORT?=		/usr/bin/tsort
>Release-Note:
>Audit-Trail:
>Unformatted: