Skip to content

Instantly share code, notes, and snippets.

@ttencate
Created February 23, 2017 08:31
Show Gist options
  • Save ttencate/958f2cc6f38925d83f7b7e0a8aa7ccce to your computer and use it in GitHub Desktop.
Save ttencate/958f2cc6f38925d83f7b7e0a8aa7ccce to your computer and use it in GitHub Desktop.
The best Makefile ever
ifeq ($(MAKECMDGOALS),me a sandwich)
.PHONY: me a sandwich
me a:
@true
sandwich:
@if [[ $$(id -u) == "0" ]]; then \
echo "Okay."; \
else \
echo "What? Make it yourself."; \
false; \
fi
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment