Subject: pkg/22506: Not all Linux systems have gmake by default
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@lothar.blef.org>
List: netbsd-bugs
Date: 08/16/2003 08:13:30
>Number:         22506
>Category:       pkg
>Synopsis:       Not all Linux systems have gmake by default
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 16 22:14:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        Debian GNU/Linux
>Organization:
>Environment:
Debian with the make package removed, pkgsrc as of 08/14/2003.
>Description:
I'd prefer to use pkgsrc as much as possible when running Linux,
so I removed Debian's make package from my system. However, when
a pkgsrc package sets USE_GMAKE, a dependency on devel/gmake is
not registered, because defs.Linux.mk blindly sets _OPSYS_HAS_GMAKE
to yes.
>How-To-Repeat:
>Fix:
Check to see if /usr/bin/make exists, and only then define
_OPSYS_HAS_GMAKE.

Index: defs.Linux.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defs.Linux.mk,v
retrieving revision 1.53
diff -u -r1.53 defs.Linux.mk
--- defs.Linux.mk	2003/06/06 19:07:42	1.53
+++ defs.Linux.mk	2003/08/16 22:02:08
@@ -37,7 +37,13 @@
 .endif
 FILE_CMD?=	/usr/bin/file
 FIND?=		/usr/bin/find
+.if exists(/usr/bin/make)
 GMAKE?=		/usr/bin/make
+_OPSYS_HAS_GMAKE=	yes	# GNU make is standard
+.else
+GMAKE?=		${LOCALBASE}/bin/gmake
+_OPSYS_HAS_GMAKE=	no	# Some custom systems may not have GNU make
+.endif
 .if exists(/bin/grep)
 GREP?=		/bin/grep
 .elif exists(/usr/bin/grep)
@@ -148,7 +154,6 @@
 
 _DO_SHLIB_CHECKS=	no	# on installation, fixup PLIST for shared libs
 _IMAKE_MAKE=		${MAKE}	# program which gets invoked by imake
-_OPSYS_HAS_GMAKE=	yes	# GNU make is standard
 .if exists(/usr/include/netinet6) || exists(/usr/include/linux/in6.h)
 _OPSYS_HAS_INET6=	yes	# IPv6 is standard
 .else
>Release-Note:
>Audit-Trail:
>Unformatted: