aboutsummaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--README34
2 files changed, 15 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index e863205..72a1cff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,9 @@
CGIT_VERSION = 0.1
-prefix = /var/www/htdocs/cgit
-gitsrc = ../git
-
+INSTALL_DIR = /var/www/htdocs/cgit
CACHE_ROOT = /var/cache/cgit
-EXTLIBS = $(gitsrc)/libgit.a $(gitsrc)/xdiff/lib.a -lz -lcrypto
+
+EXTLIBS = ../git/libgit.a ../git/xdiff/lib.a -lz -lcrypto
OBJECTS = shared.o cache.o parsing.o html.o ui-shared.o ui-repolist.o \
ui-summary.o ui-log.o ui-view.c ui-tree.c ui-commit.c ui-diff.o
@@ -17,11 +16,10 @@ endif
all: cgit
install: all clean-cache
- mkdir -p $(prefix)
- install cgit $(prefix)/cgit.cgi
- install cgit.css $(prefix)/cgit.css
+ install cgit $(INSTALL_DIR)/cgit.cgi
+ install cgit.css $(INSTALL_DIR)/cgit.css
-cgit: cgit.c cgit.h git.h $(OBJECTS) $(gitsrc)/libgit.a
+cgit: cgit.c cgit.h git.h $(OBJECTS)
$(CC) $(CFLAGS) -DCGIT_VERSION='"$(CGIT_VERSION)"' cgit.c -o cgit \
$(OBJECTS) $(EXTLIBS)
@@ -29,10 +27,6 @@ $(OBJECTS): cgit.h git.h
ui-diff.o: xdiff.h
-$(gitsrc)/libgit.a:
- $(MAKE) -C $(gitsrc)
-
-
.PHONY: clean
clean:
rm -f cgit *.o
diff --git a/README b/README
index a14418e..17e284e 100644
--- a/README
+++ b/README
@@ -8,36 +8,20 @@ builtin cache to decrease server io-pressure.
Installation
- $ make gitsrc=<path>
- $ su
- $ make prefix=<path> install
+$ $EDITOR Makefile
+$ make
+$ sudo make install
-
-Default value for gitsrc is "../git", and this directory should contain the
-git sources.
-
-Default value for prefix is "/var/www/htdocs/cgit". This directory will
-contain "cgit.cgi" and "cgit.css" after 'make install'.
-
-After installation, httpd.conf probably must be updated with a Directory-
-section for cgit, possibly something like this:
-
- <Directory "/var/www/htdocs/cgit/">
- AllowOverride None
- Options ExecCGI
- Order allow,deny
- Allow from all
- </Directory>
+Note: cgit requires the git and xdiff libraries. Currently, the makefile
+expects these files to be found in '../git/libgit.a' and '../git/xdiff/lib.a',
+where they will be if you have built git from source in a parallell directory.
Runtime configuration
-The file /etc/cgitrc is read by cgit before handling a request. In addition
-to runtime parameters, this file also contains a list of the repositories
-displayed by cgit.
-
-A template cgitrc is shipped with the sources, and all parameters and default
-values are documented in this file.
+The file /etc/cgitrc is read by cgit before handling a request. A template
+cgitrc is shipped with the sources, and all parameters and default values
+can be found in this file.
The cache