USER := $(shell whoami)
ifeq ($(USER), root)
MESSAGE = "Okay."
else
MESSAGE = "What? Make it yourself."
endif
NOECHO = @
me ::
- $(NOECHO) echo $(MESSAGE)
a ::
- $(NOECHO) echo
sandwich ::
- $(NOECHO) echo
|
|
Preferably, one that flies from Montgomery.
May 21, 2008 | 2 Comments | Post a Comment
|
Yay for broken (er, uhm, gnu) makefiles. Standards for the win!
> mikew@mesamike:~$ make me a sandwich
> What? Make it yourself.
Nuts. And now I'm really hungry!