From e1b4ab38975b8ebe4a5f5dc5692c9158ce1b5409 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Fri, 18 Dec 2009 20:23:26 +0059 Subject: =?UTF-8?q?Add=20=E2=80=9CTOPDIR=3D=E2=80=A6=20gmake=20show=3DFOO?= =?UTF-8?q?=E2=80=9D=20functionality?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thorsten Glaser --- rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index 390b05d0a..7bc0b44d9 100644 --- a/rules.mk +++ b/rules.mk @@ -42,3 +42,9 @@ HOSTLDFLAGS?= TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS}) TARGET_CC:= $(strip ${TARGET_CC}) TARGET_CXX:= $(strip ${TARGET_CXX}) + +ifneq (${show},) +.DEFAULT_GOAL:= show +show: + @$(info ${${show}}) +endif -- cgit v1.2.3 From ff88b47383f872dbc8b1cf734f5a1679cc9cbe9b Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sun, 20 Dec 2009 13:40:32 +0059 Subject: =?UTF-8?q?In=20addition=20to=20=E2=80=9Cshow=E2=80=9D,=20also=20d?= =?UTF-8?q?o=20a=20=E2=80=9Cdump=E2=80=9D=20target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to MirBSD commitid 1004B2E19EE11E297EC – although this is a kind of “masterpiece” of freakin’ GNU make hackery. Here, quoting is achieved manually by the formula of “replace ‘'’ by ‘'\''’ and wrap the whole thing in ‘'…'’” instead of the easier variable expansion suffix :Q which BSD make has. Compare: • GNU make ifneq (${dump},) __shquote= '$(subst ','\'',$(1))' __dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)})) .DEFAULT_GOAL:= show show: @$(foreach _s,${dump},$(call __dumpvar,${_s});) endif • BSD make .ifdef dump .MAIN: show show: . for _s in ${dump} @echo ${_s:Q:Q}=${${_s}:Q:Q} . endfor .endif Signed-off-by: Thorsten Glaser --- rules.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index 7bc0b44d9..9703704a9 100644 --- a/rules.mk +++ b/rules.mk @@ -43,8 +43,15 @@ TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS}) TARGET_CC:= $(strip ${TARGET_CC}) TARGET_CXX:= $(strip ${TARGET_CXX}) +# I hate GNU make! --mirabilos ifneq (${show},) .DEFAULT_GOAL:= show show: @$(info ${${show}}) +else ifneq (${dump},) +__shquote= '$(subst ','\'',$(1))' +__dumpvar= echo $(call __shquote,$(1)=$(call __shquote,${$(1)})) +.DEFAULT_GOAL:= show +show: + @$(foreach _s,${dump},$(call __dumpvar,${_s});) endif -- cgit v1.2.3 From 9183b983ea3f2b20359eaa7cf3a8776af301c059 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 21 Dec 2009 12:50:59 +0100 Subject: make pkgmaker and depmaker less verbose, fix build --- rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index 9703704a9..684206815 100644 --- a/rules.mk +++ b/rules.mk @@ -43,7 +43,6 @@ TARGET_CFLAGS:= $(strip -fwrapv -fno-ident ${TARGET_CFLAGS}) TARGET_CC:= $(strip ${TARGET_CC}) TARGET_CXX:= $(strip ${TARGET_CXX}) -# I hate GNU make! --mirabilos ifneq (${show},) .DEFAULT_GOAL:= show show: -- cgit v1.2.3