Skip to content

Instantly share code, notes, and snippets.

@mgor

mgor/Makefile

Created May 30, 2016
Embed
What would you like to do?
.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
You can’t perform that action at this time.