summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2016-07-09 23:55:23 +0000
committerrsiddharth <s@ricketyspace.net>2016-07-09 23:55:23 +0000
commit6ee0570945821353e30f625c53d5a34651359cfd (patch)
tree3f374d65005d1d94b6a26471e602d755c7cfb566 /Makefile
parent3bfc9f28d16302de3782bf259479abd86c8cc8d9 (diff)
add `make config` mechanism.
`make config` will now install a sample configuration file at `~/.config/git-difme/config`. * Makefile (config, $(config_dir), $(config_file)): new targets. * README.org (the config file): add sub section under `installing` section. * examples/config: add file; sample user config file.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7e05c8b..afb8292 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,10 @@ bin=$(HOME)/.bin
git_difme=$(bin)/git-difme
git_difme_src=git-difme.scm
+config_dir = $(HOME)/.config/git-difme
+config_file=$(config_dir)/config
+example_config=examples/config
+
nothing:
@echo "Give me something to make. "
.PHONY: nothing
@@ -14,6 +18,9 @@ nothing:
git-difme: $(git_difme)
.PHONY: git-difme
+config: $(config_file)
+.PHONY: config
+
$(git_difme): $(git_difme_src)
@mkdir -p $(bin)
@touch $@
@@ -24,3 +31,8 @@ $(git_difme): $(git_difme_src)
@echo "Script at" $@
@echo "Add" $(bin) "to PATH"
+$(config_dir):
+ @mkdir -p $@
+
+$(config_file): $(example_config) $(config_dir)
+ @cp -i $< $@