Created
April 12, 2016 20:16
-
-
Save shinypb/a2aad926e4e8a42f8b61cbcc808904d4 to your computer and use it in GitHub Desktop.
Makefile with example install_deps task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# To use this Makefile with your version of magic-cli, change the value of | |
# PREFIX to whatever you have renamed the main command to. | |
# | |
PREFIX = magic-cli | |
# | |
# Where to install the tools | |
# | |
DESTINATION_DIR = /usr/local/bin | |
# | |
# Files to install | |
# | |
FILES = \ | |
${PREFIX} \ | |
${PREFIX}-* | |
# | |
# Rules | |
# | |
install: install_quiet announce_installation | |
announce_installation: | |
@echo "OK, ${PREFIX} command line tools have been installed. 🎉 Here's what's available:\n" && ${PREFIX} --list | |
install_quiet: install_deps install_tools | |
install_deps: | |
sudo gem install foogem | |
install_tools: | |
@install -m 755 -p $(FILES) ${DESTINATION_DIR} | |
uninstall: | |
sh -c "cd ${DESTINATION_DIR} && rm ${PREFIX} && rm ${PREFIX}-*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment