author | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 00:13:11 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 07:09:42 (UTC) |
commit | e903011c4457c24c0095f270ca5e78c40729434f (patch) (unidiff) | |
tree | 255f128dfaf81f2fd03bb2216039bbf8f38ef167 /Makefile | |
parent | cfd2aa079770ddb4c93d5995b2cd7b5f25da3681 (diff) | |
download | cgit-e903011c4457c24c0095f270ca5e78c40729434f.zip cgit-e903011c4457c24c0095f270ca5e78c40729434f.tar.gz cgit-e903011c4457c24c0095f270ca5e78c40729434f.tar.bz2 |
Use tables and css to create the diffstat graph, fix scaling
There was no need to use image-files for the graphs, so lets drop them.
At the same time, fix scaling of the graphs so that the full width is
used only if atleast 100 LOC are changed in one of the files.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | Makefile | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1,85 +1,84 @@ | |||
1 | CGIT_VERSION = 0.4 | 1 | CGIT_VERSION = 0.4 |
2 | 2 | ||
3 | prefix = /var/www/htdocs/cgit | 3 | prefix = /var/www/htdocs/cgit |
4 | 4 | ||
5 | SHA1_HEADER = <openssl/sha.h> | 5 | SHA1_HEADER = <openssl/sha.h> |
6 | CACHE_ROOT = /var/cache/cgit | 6 | CACHE_ROOT = /var/cache/cgit |
7 | CGIT_CONFIG = /etc/cgitrc | 7 | CGIT_CONFIG = /etc/cgitrc |
8 | CGIT_SCRIPT_NAME = cgit.cgi | 8 | CGIT_SCRIPT_NAME = cgit.cgi |
9 | 9 | ||
10 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto | 10 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto |
11 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ | 11 | OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \ |
12 | ui-summary.o ui-log.o ui-view.o ui-tree.o ui-commit.o ui-diff.o \ | 12 | ui-summary.o ui-log.o ui-view.o ui-tree.o ui-commit.o ui-diff.o \ |
13 | ui-snapshot.o ui-blob.o | 13 | ui-snapshot.o ui-blob.o |
14 | 14 | ||
15 | CFLAGS += -Wall | 15 | CFLAGS += -Wall |
16 | 16 | ||
17 | ifdef DEBUG | 17 | ifdef DEBUG |
18 | CFLAGS += -g | 18 | CFLAGS += -g |
19 | endif | 19 | endif |
20 | 20 | ||
21 | CFLAGS += -Igit | 21 | CFLAGS += -Igit |
22 | CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' | 22 | CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' |
23 | CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' | 23 | CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' |
24 | CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' | 24 | CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' |
25 | CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' | 25 | CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' |
26 | 26 | ||
27 | 27 | ||
28 | # | 28 | # |
29 | # If make is run on a nongit platform, we need to get the git sources as a tarball. | 29 | # If make is run on a nongit platform, we need to get the git sources as a tarball. |
30 | # But there is currently no recent enough tarball available on kernel.org, so download | 30 | # But there is currently no recent enough tarball available on kernel.org, so download |
31 | # a zipfile from hjemli.net instead | 31 | # a zipfile from hjemli.net instead |
32 | # | 32 | # |
33 | GITVER = $(shell git version 2>/dev/null || echo nogit) | 33 | GITVER = $(shell git version 2>/dev/null || echo nogit) |
34 | ifeq ($(GITVER),nogit) | 34 | ifeq ($(GITVER),nogit) |
35 | GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 | 35 | GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 |
36 | INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) | 36 | INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) |
37 | else | 37 | else |
38 | INITGIT = ./submodules.sh -i | 38 | INITGIT = ./submodules.sh -i |
39 | endif | 39 | endif |
40 | 40 | ||
41 | 41 | ||
42 | # | 42 | # |
43 | # basic build rules | 43 | # basic build rules |
44 | # | 44 | # |
45 | all: cgit | 45 | all: cgit |
46 | 46 | ||
47 | cgit: cgit.c cgit.h $(OBJECTS) | 47 | cgit: cgit.c cgit.h $(OBJECTS) |
48 | $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) | 48 | $(CC) $(CFLAGS) cgit.c -o cgit $(OBJECTS) $(EXTLIBS) |
49 | 49 | ||
50 | $(OBJECTS): cgit.h git/libgit.a | 50 | $(OBJECTS): cgit.h git/libgit.a |
51 | 51 | ||
52 | git/libgit.a: | 52 | git/libgit.a: |
53 | $(INITGIT) | 53 | $(INITGIT) |
54 | $(MAKE) -C git | 54 | $(MAKE) -C git |
55 | 55 | ||
56 | # | 56 | # |
57 | # phony targets | 57 | # phony targets |
58 | # | 58 | # |
59 | install: all clean-cache | 59 | install: all clean-cache |
60 | mkdir -p $(prefix) | 60 | mkdir -p $(prefix) |
61 | install cgit $(prefix)/$(CGIT_SCRIPT_NAME) | 61 | install cgit $(prefix)/$(CGIT_SCRIPT_NAME) |
62 | install cgit.css $(prefix)/cgit.css | 62 | install cgit.css $(prefix)/cgit.css |
63 | install add.png del.png $(prefix)/ | ||
64 | 63 | ||
65 | clean-cgit: | 64 | clean-cgit: |
66 | rm -f cgit *.o | 65 | rm -f cgit *.o |
67 | 66 | ||
68 | distclean-cgit: clean-cgit | 67 | distclean-cgit: clean-cgit |
69 | git clean -d -x | 68 | git clean -d -x |
70 | 69 | ||
71 | clean-sub: | 70 | clean-sub: |
72 | $(MAKE) -C git clean | 71 | $(MAKE) -C git clean |
73 | 72 | ||
74 | distclean-sub: clean-sub | 73 | distclean-sub: clean-sub |
75 | $(shell cd git && git clean -d -x) | 74 | $(shell cd git && git clean -d -x) |
76 | 75 | ||
77 | clean-cache: | 76 | clean-cache: |
78 | rm -rf $(CACHE_ROOT)/* | 77 | rm -rf $(CACHE_ROOT)/* |
79 | 78 | ||
80 | clean: clean-cgit clean-sub | 79 | clean: clean-cgit clean-sub |
81 | 80 | ||
82 | distclean: distclean-cgit distclean-sub | 81 | distclean: distclean-cgit distclean-sub |
83 | 82 | ||
84 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ | 83 | .PHONY: all install clean clean-cgit clean-sub clean-cache \ |
85 | distclean distclean-cgit distclean-sub | 84 | distclean distclean-cgit distclean-sub |