summaryrefslogtreecommitdiffabout
path: root/Makefile
authorChris Pickel <sfiera@macports.org>2007-09-08 09:34:11 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-09-08 09:34:27 (UTC)
commit97ded7c1c37078d34c0213d72777fdff3b6aebda (patch) (unidiff)
tree941cd5004d0a7be34723525ad6d226ac2d2220a0 /Makefile
parent96a24212fda0047a7cd5d79cc43377ce24c1f85c (diff)
downloadcgit-97ded7c1c37078d34c0213d72777fdff3b6aebda.zip
cgit-97ded7c1c37078d34c0213d72777fdff3b6aebda.tar.gz
cgit-97ded7c1c37078d34c0213d72777fdff3b6aebda.tar.bz2
Makefile: add support for DESTDIR
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 2fbdf67..d95a5a3 100644
--- a/Makefile
+++ b/Makefile
@@ -28,44 +28,44 @@ VERSION: force-version
28-include VERSION 28-include VERSION
29 29
30 30
31CFLAGS += -g -Wall -Igit 31CFLAGS += -g -Wall -Igit
32CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' 32CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
33CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' 33CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
34CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' 34CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
35CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' 35CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
36 36
37 37
38cgit: cgit.c $(OBJECTS) 38cgit: cgit.c $(OBJECTS)
39 $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) 39 $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS)
40 40
41$(OBJECTS): cgit.h git/xdiff/lib.a git/libgit.a VERSION 41$(OBJECTS): cgit.h git/xdiff/lib.a git/libgit.a VERSION
42 42
43git/xdiff/lib.a: | git 43git/xdiff/lib.a: | git
44 44
45git/libgit.a: | git 45git/libgit.a: | git
46 46
47git: 47git:
48 cd git && $(MAKE) xdiff/lib.a 48 cd git && $(MAKE) xdiff/lib.a
49 cd git && $(MAKE) libgit.a 49 cd git && $(MAKE) libgit.a
50 50
51install: all 51install: all
52 mkdir -p $(CGIT_SCRIPT_PATH) 52 mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH)
53 install cgit $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) 53 install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
54 install cgit.css $(CGIT_SCRIPT_PATH)/cgit.css 54 install cgit.css $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css
55 rm -rf $(CACHE_ROOT)/* 55 rm -rf $(DESTDIR)$(CACHE_ROOT)/*
56 56
57uninstall: 57uninstall:
58 rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) 58 rm -f $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
59 rm -f $(CGIT_SCRIPT_PATH)/cgit.css 59 rm -f $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css
60 rm -rf $(CACHE_ROOT) 60 rm -rf $(DESTDIR)$(CACHE_ROOT)
61 61
62clean: 62clean:
63 rm -f cgit VERSION *.o 63 rm -f cgit VERSION *.o
64 cd git && $(MAKE) clean 64 cd git && $(MAKE) clean
65 65
66distclean: clean 66distclean: clean
67 git clean -d -x 67 git clean -d -x
68 cd git && git clean -d -x 68 cd git && git clean -d -x
69 69
70get-git: 70get-git:
71 curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git 71 curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git