Date: Fri, 10 Jan 2014 11:40:04 GMT From: Julien Charbon <jcharbon@verisign.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/185636: [PATCH] devel/gmake: implicit gmake re-executions miss MAKEFLAGS with make-3.82 Message-ID: <201401101140.s0ABe4P4089416@oldred.freebsd.org> Resent-Message-ID: <201401101150.s0ABo0OP054700@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 185636 >Category: ports >Synopsis: [PATCH] devel/gmake: implicit gmake re-executions miss MAKEFLAGS with make-3.82 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 10 11:50:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Julien Charbon >Release: 8.4 >Organization: Verisign >Environment: FreeBSD host 8.4-RELEASE-p4 FreeBSD 8.4-RELEASE-p4 #0 r+b89309b: Tue Sep 24 09:41:33 UTC 2013 root@host:/usr/src/freebsd/sys/GENERIC amd64 >Description: A bug introduced in gmake 3.82 (and not present in gmake 3.81) drives this unexpected behaviour: When gmake automatically restarts itself because one of its includes is updated, the "MAKEFLAGS" environment variable is no more honoured. This issue is described here: http://savannah.gnu.org/bugs/?30723 And it is fixed in various Linux distros that use gmake 3.82: ArchLinux: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/make-3.82-bug30723.patch?h=packages/make&id=a8335b891e635b8173e37155af2554ec345f181f Fedora: http://pkgs.fedoraproject.org/cgit/make.git/tree/make-3.82-bugfixes.patch#n39 >How-To-Repeat: >Fix: Apply the joined patch to devel/gmake port Patch attached with submission follows: diff --git a/devel/gmake/files/patch-main.c b/devel/gmake/files/patch-main.c new file mode 100644 index 0000000..9935ca7 --- /dev/null +++ b/devel/gmake/files/patch-main.c @@ -0,0 +1,17 @@ +When gmake automatically restart itself because one of its includes is updated, +the "MAKEFLAGS" environment variable is no more honoured. + +http://savannah.gnu.org/bugs/?30723 + +diff -rU3 -N make-3.82.orig/main.c make-3.82/main.c +--- main.c.orig 2010-07-19 07:10:53.000000000 +0000 ++++ main.c 2014-01-10 10:55:32.000000000 +0000 +@@ -2093,7 +2093,7 @@ + const char *pv = define_makeflags (1, 1); + char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); + sprintf (p, "MAKEFLAGS=%s", pv); +- putenv (p); ++ putenv (allocated_variable_expand (p)); + } + + if (ISDB (DB_BASIC)) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401101140.s0ABe4P4089416>