From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org
Subject: kbuild: shorthand ym2y, ym2m etc
Date: Sun, 30 Jan 2005 20:37:33 +0100 [thread overview]
Message-ID: <20050130193733.GA8984@mars.ravnborg.org> (raw)
We have in several cases the need to transpose a i'm' to 'y' in the Kbuild
files.
One example is the following snippet from sound/Makefile:
ifeq ($(CONFIG_SND),y)
obj-y += last.o
endif
Alternative syntax could be:
obj-$(call y2y,CONFIG_SND) += last.o
y2y takes one parameter and return y unly if parameter is y, otherwise
return nothing.
>From drivers/vidoe/Makfile:
ifeq ($(CONFIG_FB),y)
obj-$(CONFIG_PPC) += macmodes.o
endif
Altetnative syntax:
obj-$(call yx2x,CONFIG_FB,CONFIG_PPC) += mcmodes.o
yx2x return second parameter (x) if first parameter is y. Otherwise
nothing is returned.
To be complete the full set would be:
ym2y
ym2m
empty2y
empty2m
y2y
m2y
y2m
m2m
yx2x
mx2x
Would that be considered usefull?
Sam
next reply other threads:[~2005-01-30 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-30 19:37 Sam Ravnborg [this message]
2005-01-30 19:48 ` kbuild: shorthand ym2y, ym2m etc Muli Ben-Yehuda
2005-01-30 19:52 ` Christoph Hellwig
2005-01-30 22:39 ` Sam Ravnborg
2005-01-30 22:44 ` Russell King
2005-01-30 22:51 ` Sam Ravnborg
2005-01-30 22:41 ` Arnd Bergmann
2005-01-30 22:59 ` Sam Ravnborg
2005-01-31 1:57 ` Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050130193733.GA8984@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.