* [Qemu-devel] [PATCH 1/3] rules.mak: New logical functions
@ 2013-06-22 2:23 akoskovacs0
0 siblings, 0 replies; only message in thread
From: akoskovacs0 @ 2013-06-22 2:23 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, Ákos Kovács
From: Ákos Kovács <akoskovacs@gmx.com>
New functions are added: lnot, land, lor, lif, eq, ne, isempty, notempty
Example usage:
obj-$(call lor,$(CONFIG_LINUX),$(CONFIG_BSD)) += feature.o
Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
---
rules.mak | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/rules.mak b/rules.mak
index 4499745..7e8e3bd 100644
--- a/rules.mak
+++ b/rules.mak
@@ -106,6 +106,22 @@ clean: clean-timestamp
obj := .
old-nested-dirs :=
+# Logical functions
+lnot = $(if $(subst n,,$1),n,y)
+
+land-yy = y
+land = $(land-$1$2)
+
+lor = $(findstring y,$1,$2)
+
+lif = $(if $(subst n,,$1),$2,$3)
+
+eq = $(if $(subst $2,,$1)$(subst $1,,$2),n,y)
+ne = $(if $(subst $2,,$1)$(subst $1,,$2),y,n)
+
+isempty = $(call eq,$1,)
+notempty = $(call ne,$1,)
+
define push-var
$(eval save-$2-$1 = $(value $1))
$(eval $1 :=)
--
1.7.2.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-22 2:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-22 2:23 [Qemu-devel] [PATCH 1/3] rules.mak: New logical functions akoskovacs0
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).