diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile63
1 file changed, 6 insertions, 57 deletions
diff --git a/Makefile b/Makefile
index 6324880..c0d6f7d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-# The entry point for building, documenting and installing cgit. The program
-# itself is compiled inside the bundled Git tree by source/cgit.mk, which this
-# file invokes with the paths and the defaults it needs. Everything that is not
-# compilation, that is the manual page, the install and uninstall rules and the
-# housekeeping targets, is driven from here.
+# The entry point for building and installing cgit. The program itself is
+# compiled inside the bundled Git tree by source/cgit.mk, which this file
+# invokes with the paths and the defaults it needs. Everything that is not
+# compilation, that is the install and uninstall rules and the housekeeping
+# targets, is driven from here.
.DEFAULT_GOAL := all
.SUFFIXES:
@@ -39,28 +39,13 @@ CACHE_ROOT = /var/cache/cgit
prefix = /usr/local
libdir = $(prefix)/lib
filterdir = $(libdir)/cgit/filters
-docdir = $(prefix)/share/doc/cgit
-htmldir = $(docdir)
-mandir = $(prefix)/share/man
# The files that go into the data path and the filter directory. One list each
# drives both install and uninstall, so the two can never drift apart.
ASSETS = cgit.css cgit.js cgit.png favicon.ico robots.txt
FILTER_FILES = $(notdir $(wildcard $(EXTDIR)/*.lua))
-# The manual page source, *.5.txt, sits at the project root and is rendered
-# into build/. Only one man section exists, so both document lists derive
-# straight from MAN5_TXT.
-MAN5_TXT = $(wildcard *.5.txt)
-DOC_MAN5 = $(patsubst %.txt,$(BUILDDIR)/%,$(MAN5_TXT))
-DOC_HTML = $(patsubst %.txt,$(BUILDDIR)/%.html,$(MAN5_TXT))
-
INSTALL = install
-ASCIIDOC = asciidoc
-ASCIIDOC_EXTRA =
-ASCIIDOC_HTML = xhtml11
-ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA)
-TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
# Reuse Git's platform detection, then let the user override any of the
# settings above through cgit.conf. Both includes must stay after the defaults.
@@ -94,18 +79,6 @@ test: cgit-with-git
cgit-with-git:
+@$(MAKE) cgit EXTRA_GIT_TARGETS=all
-doc: doc-man doc-html
-doc-man: $(DOC_MAN5)
-doc-html: $(DOC_HTML)
-
-$(DOC_MAN5): $(BUILDDIR)/%.5 : %.5.txt
- @mkdir -p $(BUILDDIR)
- a2x -f manpage -D $(BUILDDIR) $<
-
-$(DOC_HTML): $(BUILDDIR)/%.html : %.txt
- @mkdir -p $(BUILDDIR)
- $(TXT_TO_HTML) -o $@ $<
-
install: all
$(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_SCRIPT_PATH)
$(INSTALL) -m 0755 $(BUILDDIR)/cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
@@ -114,33 +87,11 @@ install: all
$(INSTALL) -m 0755 -d $(DESTDIR)$(filterdir)
$(INSTALL) -m 0644 $(EXTDIR)/*.lua $(DESTDIR)$(filterdir)
-install-doc: install-man install-html
-
-install-man: doc-man
- $(INSTALL) -m 0755 -d $(DESTDIR)$(mandir)/man5
- $(INSTALL) -m 0644 $(DOC_MAN5) $(DESTDIR)$(mandir)/man5
-
-install-html: doc-html
- $(INSTALL) -m 0755 -d $(DESTDIR)$(htmldir)
- $(INSTALL) -m 0644 $(DOC_HTML) $(DESTDIR)$(htmldir)
-
uninstall:
$(RM) $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
$(RM) $(addprefix $(DESTDIR)$(CGIT_DATA_PATH)/,$(ASSETS))
$(RM) $(addprefix $(DESTDIR)$(filterdir)/,$(FILTER_FILES))
-uninstall-doc: uninstall-man uninstall-html
-
-uninstall-man:
- @for i in $(notdir $(DOC_MAN5)); do \
- rm -fv $(DESTDIR)$(mandir)/man5/$$i; \
- done
-
-uninstall-html:
- @for i in $(notdir $(DOC_HTML)); do \
- rm -fv $(DESTDIR)$(htmldir)/$$i; \
- done
-
# Compiled output lives under build/ and the test suite writes into tests/, so
# cleaning removes both. The descent into tests is guarded because
# tests/Makefile includes git's config.mak.uname, which needs the submodule
@@ -162,7 +113,5 @@ tags:
# Grouped to mirror the order of the targets above.
.PHONY: all cgit cgit-with-git sparse test
-.PHONY: doc doc-man doc-html
-.PHONY: install install-doc install-man install-html
-.PHONY: uninstall uninstall-doc uninstall-man uninstall-html
+.PHONY: install uninstall
.PHONY: clean cleanall get-git tags