Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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