Commit Diff


commit - a46b9f33fb3018765180eb67cc954d863a5cd525
commit + bb5b19e3e76cd78d622d174e0a2a718869a2c8fd
blob - 50b44e8e8dea7d5f42132ed59e71a65b1836b11e
blob + 39e9e02acb1388a655e734357de0e53e6dd389de
--- Makefile
+++ Makefile
@@ -30,9 +30,9 @@ dist: clean
 	rm got-dist.txt.new
 
 web:
-	${MAKE} -C gotweb MAKEWEB=Yes
+	${MAKE} -C gotweb
 
 web-install:
-	${MAKE} -C gotweb install MAKEWEB=Yes
+	${MAKE} -C gotweb install
 
 .include <bsd.subdir.mk>
blob - c51458d0db217145fd9356f10661dd17f09fba30
blob + bb6ed69a102b03fb61b3fafbe7e4cd7487693514
--- Makefile.inc
+++ Makefile.inc
@@ -27,22 +27,3 @@ DEBUG = -O0 -g
 .endif
 
 .endif
-
-.if "${MAKEWEB}" == "Yes"
-LDADD +=	-L${PREFIX}/lib -lz -lutil
-LDSTATIC =	${STATIC}
-PREFIX =	/usr/local
-CHROOT_DIR =	/var/www
-GOTWEB_DIR =	/cgi-bin/gotweb
-LIBEXECDIR =	${GOTWEB_DIR}/libexec
-LIBEXEC_DIR =	${CHROOT_DIR}${LIBEXECDIR}
-ETC_DIR =	${CHROOT_DIR}/etc
-HTTPD_DIR =	${CHROOT_DIR}/htdocs
-TMP_DIR =	${CHROOT_DIR}/tmp
-PROG_DIR =	${HTTPD_DIR}/${PROG}
-CGI_DIR =	${CHROOT_DIR}${GOTWEB_DIR}
-TMPL_DIR =	${CGI_DIR}/gw_tmpl
-PUB_REPOS_DIR =	${CHROOT_DIR}/got/public
-WWWUSR ?=	www
-WWWGRP ?=	www
-.endif
blob - a738cb34bf84d8765f958cdfd2d9aad480f28261
blob + 3a1ae060f78dfd753d5bbab1e8e897239ccf3bd0
--- gotweb/Makefile
+++ gotweb/Makefile
@@ -1,8 +1,9 @@
 .PATH:${.CURDIR}/../lib
 
-SUBDIR = ../libexec
+SUBDIR = libexec
 
 .include "../got-version.mk"
+.include "Makefile.inc"
 
 PROG =		gotweb
 SRCS =		gotweb.c parse.y blame.c commit_graph.c delta.c diff.c \
@@ -14,9 +15,8 @@ SRCS =		gotweb.c parse.y blame.c commit_graph.c delta.
 MAN =		${PROG}.conf.5
 
 CPPFLAGS +=	-I${.CURDIR}/../include -I${.CURDIR}/../lib -I${.CURDIR} \
-		-I${PREFIX}/include
-
-LDADD =		-L${PREFIX}/lib -lkcgihtml -lkcgi -lz -lutil
+		-I${KCGIBASE}/include
+LDADD +=	-L${KCGIBASE}/lib -lkcgihtml -lkcgi
 LDSTATIC =	${STATIC}
 
 .if ${GOT_RELEASE} != "Yes"
blob - /dev/null
blob + f7c4df6347053c16aa176997fe3ffa7217a07403 (mode 644)
--- /dev/null
+++ gotweb/Makefile.inc
@@ -0,0 +1,16 @@
+KCGIBASE ?=	/usr/local
+LDADD +=	-lz -lutil
+LDSTATIC =	${STATIC}
+CHROOT_DIR =	/var/www
+GOTWEB_DIR =	/cgi-bin/gotweb
+LIBEXECDIR =	${GOTWEB_DIR}/libexec
+LIBEXEC_DIR =	${CHROOT_DIR}${LIBEXECDIR}
+ETC_DIR =	${CHROOT_DIR}/etc
+HTTPD_DIR =	${CHROOT_DIR}/htdocs
+TMP_DIR =	${CHROOT_DIR}/tmp
+PROG_DIR =	${HTTPD_DIR}/${PROG}
+CGI_DIR =	${CHROOT_DIR}${GOTWEB_DIR}
+TMPL_DIR =	${CGI_DIR}/gw_tmpl
+PUB_REPOS_DIR =	${CHROOT_DIR}/got/public
+WWWUSR ?=	www
+WWWGRP ?=	www
blob - /dev/null
blob + a4c900b7f50d8d643524becc373f46951d405243 (mode 644)
--- /dev/null
+++ gotweb/libexec/Makefile
@@ -0,0 +1,4 @@
+SUBDIR = got-read-blob got-read-commit got-read-object got-read-tree \
+	got-read-tag got-read-pack got-read-gitconfig
+
+.include <bsd.subdir.mk>
blob - /dev/null
blob + ea1131ae845c3a57109e51704785d35953c99d46 (mode 644)
--- /dev/null
+++ gotweb/libexec/Makefile.inc
@@ -0,0 +1,11 @@
+.include "../Makefile.inc"
+
+realinstall:
+	if [ ! -d ${CHROOT_DIR}${LIBEXECDIR}/. ]; then \
+		${INSTALL} -d -o root -g daemon -m 755 \
+		    ${CHROOT_DIR}${LIBEXECDIR}; \
+	fi
+	${INSTALL} ${INSTALL_COPY} -o root -g daemon -m 755 ${PROG} \
+	    ${CHROOT_DIR}${LIBEXECDIR}/${PROG}
+
+NOMAN = Yes
blob - /dev/null
blob + fb9095d18f1dd271324059f13667cb202c67bf2c (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-blob/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-blob
+SRCS=		got-read-blob.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-blob
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + 1e78a9b68b2a9b607772d9aed122dc7305f33912 (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-commit/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-commit
+SRCS=		got-read-commit.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-commit
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + 76cd8d771a280f1fb361b83342fde40ba21744d2 (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-gitconfig/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-gitconfig
+SRCS=		got-read-gitconfig.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c gitconfig.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-gitconfig
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + 22604cc702d35f75d0004cad43d0627ae0b3ee33 (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-object/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-object
+SRCS=		got-read-object.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-object
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + eae7dbb349e69db10c5ebd08d15e9c28222c7e82 (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-pack/Makefile
@@ -0,0 +1,16 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-pack
+SRCS=		got-read-pack.c delta.c error.c inflate.c object_cache.c \
+		object_idset.c object_parse.c opentemp.c pack.c path.c \
+		privsep.c sha1.c delta_cache.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-pack
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + 375212d67beacf7978f98ddbfe466472b054c339 (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-tag/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-tag
+SRCS=		got-read-tag.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-tag
+
+.include <bsd.prog.mk>
blob - /dev/null
blob + b601aeaf437b0157a6f4677965493703b684644e (mode 644)
--- /dev/null
+++ gotweb/libexec/got-read-tree/Makefile
@@ -0,0 +1,15 @@
+
+.include "../../../got-version.mk"
+
+PROG=		got-read-tree
+SRCS=		got-read-tree.c error.c inflate.c object_parse.c \
+		path.c privsep.c sha1.c
+
+CPPFLAGS = -I${.CURDIR}/../../../include -I${.CURDIR}/../../../lib
+LDADD = -lutil -lz
+DPADD = ${LIBZ} ${LIBUTIL}
+LDSTATIC = ${STATIC}
+
+.PATH:	${.CURDIR}/../../../lib ${.CURDIR}/../../../libexec/got-read-tree
+
+.include <bsd.prog.mk>