lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1383476964-25815-1-git-send-email-yann.morin.1998@free.fr>
Date:	Sun,  3 Nov 2013 12:09:24 +0100
From:	"Yann E. MORIN" <yann.morin.1998@...e.fr>
To:	linux-kbuild@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, Michal Marek <mmarek@...e.cz>,
	"Yann E. MORIN" <yann.morin.1998@...e.fr>,
	Ryan Barnett <rjbarnet@...kwellcollins.com>
Subject: [PATCH] Makefile: fix out-of-tree builds for multiple targets with 'all'

From: "Yann E. MORIN" <yann.morin.1998@...e.fr>

For out-of-tree builds, this use-case fails to build:
    $ make clean all

This is because 'all' is filtered-out in the Makefile wrapper, since
the wrapper itself has a 'all' target.

The 'all' target is just the usual naming for the default target in a
Makefile. In fact, the first target is the default one, so we can name
it whatever we want.

Rename the Makefile wrapper 'all' target to avoid name-clashing.

Reported-by: Ryan Barnett <rjbarnet@...kwellcollins.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@...e.fr>
Cc: Ryan Barnett <rjbarnet@...kwellcollins.com>

---
Note: this still does not allow 'make menuconfig all', but that is not
even working for in-tree builds either.
---
 scripts/mkmakefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 0cc0442..28583bc 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -42,18 +42,18 @@ MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$
 
 MAKEFLAGS += --no-print-directory
 
-.PHONY: all \$(MAKECMDGOALS)
+.PHONY: _all \$(MAKECMDGOALS)
 
-all	:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
+all	:= \$(filter-out Makefile,\$(MAKECMDGOALS))
 
-all:
+_all:
 	\$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
-\$(all): all
+\$(all): _all
 	@:
 
-%/: all
+%/: _all
 	@:
 EOF
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ