Makefile - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(HTM) git clone git://jay.scot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
Makefile (614B)
---
1 REPOSITORY = git://git.suckless.org/slstatus
2 SRC_DIR = src
3 PINNED_REVISION = HEAD
4
5 all: $(SRC_DIR)
6
7 clean: reset
8 @if test -d $(SRC_DIR); then \
9 cd $(SRC_DIR); \
10 $(MAKE) -s clean; \
11 git clean -f; \
12 fi
13
14 $(SRC_DIR): clone reset
15 @cp config.h $@
16 @cd $@ && $(MAKE) -s
17
18 reset:
19 @if [ -n "$(strip $(PINNED_REVISION))" ]; then \
20 cd $(SRC_DIR) && git reset --hard $(PINNED_REVISION); \
21 fi
22
23 clone:
24 @if ! test -d $(SRC_DIR); then \
25 git clone $(REPOSITORY) $(SRC_DIR); \
26 fi
27
28 update: clean
29 @cd $(SRC_DIR) && git pull
30
31 install:
32 $(MAKE) -C "${SRC_DIR}" -s install
33
34
35 .PHONY: all clean update install reset clone