public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kbuild: shorthand ym2y, ym2m etc
@ 2005-01-30 19:37 Sam Ravnborg
  2005-01-30 19:48 ` Muli Ben-Yehuda
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sam Ravnborg @ 2005-01-30 19:37 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-01-31  1:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-30 19:37 kbuild: shorthand ym2y, ym2m etc Sam Ravnborg
2005-01-30 19:48 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox