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 (745B)
---
1 REPOSITORY = https://github.com/dudik/herbe.git
2 SRC_DIR = src
3 PINNED_REVISION = HEAD
4 PATCH_DIR = patches
5
6 all: $(SRC_DIR)
7
8 clean: reset
9 @if test -d $(SRC_DIR); then \
10 $(MAKE) -C "${SRC_DIR}" -s clean; \
11 git -C "${SRC_DIR}" clean -f; \
12 fi
13
14 $(SRC_DIR): clone reset
15 @cp config.h $@
16 $(MAKE) -C "${SRC_DIR}" -s
17
18 reset:
19 @if [ -n "$(strip $(PINNED_REVISION))" ]; then \
20 git -C "${SRC_DIR}" reset --hard $(PINNED_REVISION); \
21 fi
22
23 patch: $(PATCH_DIR)/*
24 @for file in $^ ; do \
25 patch -d "${SRC_DIR}" < $${file}; \
26 done
27
28 clone:
29 @if ! test -d $(SRC_DIR); then \
30 git clone $(REPOSITORY) $(SRC_DIR); \
31 fi
32
33 update: clean
34 @git -C "${SRC_DIR}" pull
35
36 install:
37 $(MAKE) -C "${SRC_DIR}" -s install
38
39
40 .PHONY: all clean update install reset clone