pkgsrc-Bugs archive

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

pkg/42274: xorg-cf-files and gmake



>Number:         42274
>Category:       pkg
>Synopsis:       xorg-cf-files and gmake
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 06 03:05:00 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2009Q3
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.
>Description:
This bug does not affect xorg-cf-files, but will affect some packages that
have USE_IMAKE=yes set and on platforms with IMAKE_MAKE?=${GMAKE}.

Eg:
make[1]: Entering directory `/tmp/obj_pkgsrc/net/tightvnc/work/vnc_unixsrc'
making Makefiles in libvncauth...
        mv -f Makefile Makefile.bak
usage: bmake [-BeikNnqrstWX] [-D variable] [-d flags] [-f makefile]
            [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
            [-V variable] [variable=value] [target ...]
make[1]: [Makefiles] Error 2 (ignored)
make[1]: Leaving directory `/tmp/obj_pkgsrc/net/tightvnc/work/vnc_unixsrc'
make depend
make[1]: Entering directory `/tmp/obj_pkgsrc/net/tightvnc/work/vnc_unixsrc'
depending in ./libvncauth...

>How-To-Repeat:
The following makefile should show the problem, change the MAKE variable to
the correct path for bmake and run "gmake"!

--- Cut here --
MAKE=/usr/pkg/bin/bmake

.PHONY: World Makefiles
World:
        gmake Makefiles

Makefiles:
        for i in . ;\
        do \
                echo "making Makefiles in $$i" ;\
                ${MAKE} ${MFLAGS} ONESUBDIR=$$i $$i/makefile ;\
        done

$(ONESUBDIR)/makefile:
        @echo "Yippy it worked!"
--- End here --

The problem is the first gmake sets MAKELEVEL, the second gmake (World target)
sees this and acts as if it had been given the '-w', printing the line
"gmake[1]: Entering directory [...]", but it also adds '-w' to MFLAGS.

>Fix:
The following patch fixes the problem.

Index: pkgsrc/x11/xorg-cf-files/Makefile
===================================================================
--- pkgsrc.orig/x11/xorg-cf-files/Makefile
+++ pkgsrc/x11/xorg-cf-files/Makefile
@@ -16,6 +16,12 @@ PKG_DESTDIR_SUPPORT= user-destdir
 GNU_CONFIGURE=         yes
 USE_TOOLS+=            pkg-config
 
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(IMAKE_TOOLS) && !empty(IMAKE_TOOLS:Mgmake)
+USE_TOOLS+=    gmake
+.endif
+
 post-extract:
        ${CP} ${FILESDIR}/host.def ${WRKSRC}
        ${CP} ${FILESDIR}/xorgsite.def ${WRKSRC}



-- 
Steven
  1: Linux - will work for fish.
  2: The Linux penguin - looks stuffed to the brim with herring.
  ( make your own conclusions )



Home | Main Index | Thread Index | Old Index