Sandwich makefile

Sandwich webcomic from xkcd.com

Sandwich webcomic from xkcd.com

If you like this comic from xkcd.com, you are now able to reproduce the conversation in your shell. You only need this makefile:
me a:
    @true
sandwich.:
ifeq ($(shell if touch / 2> /dev/null; then id -u; fi),0)
    @echo "Okay."
else
    @echo "What? Make it yourself."
endif
.PHONY: me a sandwich.

Download the Makefile from my sandwich branch or copy & paste the text above into your preferred editor (you have to convert the spaces to tabs) and save it as Makefile. Then you can run “make me a sandwich.” in your terminal and see what happens.

About these ads

18 thoughts on “Sandwich makefile

  1. I tried out your project, but much to my surprise, when I tried to get the computer to make me a sandwich, even when using sudo, it didn’t.

    Even when it said that it would make one, no sandwich appeared on either STDPLT or STDNPKN. I think the sandwich is incorrectly going to /bin

    Please fix or I will go back to Brevel and never use Linux for sandwich making again!

  2. Pingback: Top Posts « WordPress.com

  3. Pingback: Alberto (camahueto) 's status on Tuesday, 28-Jul-09 02:07:46 UTC - Identi.ca

  4. Pingback: Nandan (gotunandan) 's status on Wednesday, 29-Jul-09 05:32:44 UTC - Identi.ca

  5. Pingback: Um Pouco de Tudo – sudo

Comments are closed.