Sudo make me a sandwich stub code
On linux-based machines, save this as the file Makefile
.SILENT: me: a: sandwich: ifeq ($(shell id -u), 0) echo "Okay" # Ordering code goes here else echo "What? Make it yourself." endif
From the directory in which that file exists, you can now type
make me a sandwich
(which does not work) and
sudo make me a sandwich
(which does). Actually making the sandwich is an exercise left to the reader (although Dominos now makes sandwiches).
