Created
May 30, 2016 08:06
-
-
Save mgor/f6905dd43201cceec399830cd07acd3b to your computer and use it in GitHub Desktop.
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
.PHONY = all install reinstall uninstall test _wrapped_stow _pre_stow _stow _post_stow _stow_ignore _install_args _reinstall_args _uninstall_args _test_args | |
all: | |
$(error You probably want to run 'make test' first) | |
_stow_ignore: | |
$(foreach file,$(wildcard *),$(eval ARGS += --ignore=$(file))) | |
_stow: _stow_ignore | |
@stow -t $(HOME) -v $(ARGS) . | |
_pre_stow: | |
@true | |
_post_stow: | |
@true | |
_install_args: | |
$(eval ARGS := -S) | |
_reinstall_args: | |
$(eval ARGS := -R) | |
_uninstall_args: | |
$(eval ARGS := -D) | |
_test_args: | |
$(eval ARGS := -n -S) | |
_wrapped_stow: _pre_stow _stow _post_stow | |
install: _install_args _wrapped_stow | |
uninstall: _uninstall_args _wrapped_stow | |
reinstall: _reinstall_args _wrapped_stow | |
test: _test_args _stow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment