pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44696: Support for diverse make-compatible MAKE_PROGRAMs [patch]



>Number:         44696
>Category:       pkg
>Synopsis:       Support for diverse make-like MAKE_PROGRAMs [patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 07 23:35:00 +0000 2011
>Originator:     Aleksey Cheusov
>Release:        NetBSD 5.1
>Organization:
>Environment:
System: NetBSD asrock.chizhovka.net 5.1 NetBSD 5.1 (GENERIC) #0: Mon Jan 31 
23:53:52 EET 2011 
cheusov%asrock.chizhovka.net@localhost:/srv/obj/sys/arch/amd64/compile/GENERIC 
amd64
Architecture: x86_64
Machine: amd64
>Description:
A number of packages in pkgsrc use make-like programs (none of
the following: imake, bmake, gmake) for building the package. For this
purpose they set MAKE_PROGRAM variable directly in package's Makefile
because it is simplier than rewriting do-build and/or do-install targets.

Due to

  MAKE_PROGRAM=${MAKE}

line in mk/tools/make.mk, MAKE_PROGRAM=make-like-tool statement is placed 
*below*

 .include "bsd.pkg.mk"

in order to override `='. This looks ugly. Also pkglint complains
about such assignment.  I propose to change MAKE_PROGRAM variable acl
in pkglint and to use ?= instead of =. Patch is below.

>Fix:
Index: mk/tools/make.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/make.mk,v
retrieving revision 1.13
diff -u -r1.13 make.mk
--- mk/tools/make.mk    17 Jul 2005 21:36:24 -0000      1.13
+++ mk/tools/make.mk    7 Mar 2011 23:10:23 -0000
@@ -52,7 +52,7 @@
 .elif !empty(_USE_TOOLS:Mimake) && defined(IMAKE_MAKE)
 MAKE_PROGRAM=          ${IMAKE_MAKE}
 .else
-MAKE_PROGRAM=          ${MAKE}
+MAKE_PROGRAM?=         ${MAKE}
 .endif
 
 TOOLS_CREATE+=         make
Index: pkgtools/pkglint/files/makevars.map
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/files/makevars.map,v
retrieving revision 1.208
diff -u -r1.208 makevars.map
--- pkgtools/pkglint/files/makevars.map 10 Feb 2011 12:08:04 -0000      1.208
+++ pkgtools/pkglint/files/makevars.map 7 Mar 2011 23:10:23 -0000
@@ -435,7 +435,7 @@
 MAKE_FLAGS             List of ShellWord [$package_list]
 MAKE_JOBS              Integer [$user]
 MAKE_JOBS_SAFE         YesNo [$package]
-MAKE_PROGRAM           ShellCommand [$system]
+MAKE_PROGRAM           ShellCommand [$package]
 MANCOMPRESSED          YesNo [m:s,c:ds]
 MANCOMPRESSED_IF_MANZ  Yes [m:s,c:ds]
 MANGRP                 UserGroupName [$system]



Home | Main Index | Thread Index | Old Index