tech-pkg archive

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

Re: MAKEFLAGS overload



In article <m1rwbdv-003BOqC@more.local> you write:
>I would suggest trying to add the following line to the package
>Makefile and see if that fixes it:
>
>	USE_TOOLS+=	gmake

I tried that and it still didn't work because of the spaces
in the UNPRIVILEGED_GROUPS value string...  

% make
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for icb-5.0.9pl1nb7
Making in murgil
make[1]: Entering directory '/usr/home/netbsd/cur/pkgsrc/chat/icb/work/icb-5.0.9/murgil'
make[1]: *** No rule to make target 'kmem'.  Stop.


>Ultimately upstream should fix their Makefile(s).  Their use of
>MAKEFLAGS is basically wrong.  MAKEFLAGS should never be used on
>command-lines in recipes as it is always passed through the environment
>to sub-makes (and MFLAGS was deprecated in all Make's I know of decades
>ago!).


that makes sense to me.  my main concern was if it was ok for us
to modify MAKEFLAGS by adding additional macro=value elements to it
or not.

my system has built 1544 packages over the past few days and this is
the only one where the spaces in UNPRIVILEGED_GROUPS caused an issue.

it seems like a patch like the below that gets rid of MFLAGS and
MAKEFLAGS and lets the environment variables do the work would be a 
reasonable way to resolve it:


--- work/icb-5.0.9/Makefile.orig	2024-04-17 15:42:54.657997516 -0400
+++ work/icb-5.0.9/Makefile	2024-04-17 15:43:11.742417463 -0400
@@ -38,7 +38,7 @@
 all:		$(PREREQS)
 	@for dir in ${DIRS}; do \
 		(echo Making in $${dir}; \
-		 cd $${dir}; sh ./gen ${MFLAGS} -${MAKEFLAGS}); done
+		 cd $${dir}; sh ./gen); done
 
 install:	$(PREREQS)
 	@for dir in ${DIRS} ${MANDIRS}; do \


('all' appears to be the only target in that Makefile that is used
by pkgsrc...)


chuck


Home | Main Index | Thread Index | Old Index