X-Git-Url: https://git.tokkee.org/?p=tig.git;a=blobdiff_plain;f=Makefile;h=3b211117320d44bddf5e5310255bd0f367b01032;hp=d764644ba99bde58ec46ad0acc682088e69b1d8a;hb=HEAD;hpb=64cf5ff6ebceb9713826aeedecc2a44e88f88835 diff --git a/Makefile b/Makefile index d764644..3b21111 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,10 @@ LDLIBS ?= -lcurses CFLAGS ?= -Wall -O2 DFLAGS = -g -DDEBUG -Werror -O0 PROGS = tig +TESTS = test-graph +SOURCE = tig.c tig.h io.c io.h graph.c graph.h TXTDOC = tig.1.txt tigrc.5.txt manual.txt NEWS README INSTALL BUGS TODO -MANDOC = tig.1 tigrc.5 +MANDOC = tig.1 tigrc.5 tigmanual.7 HTMLDOC = tig.1.html tigrc.5.html manual.html README.html NEWS.html ALLDOC = $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf @@ -58,8 +60,8 @@ ASCIIDOC_FLAGS = -aversion=$(VERSION) -asysconfdir=$(sysconfdir) XMLTO ?= xmlto DOCBOOK2PDF ?= docbook2pdf -all: $(PROGS) -all-debug: $(PROGS) +all: $(PROGS) $(TESTS) +all-debug: $(PROGS) $(TESTS) all-debug: CFLAGS += $(DFLAGS) doc: $(ALLDOC) doc-man: $(MANDOC) @@ -73,16 +75,24 @@ install: all install-doc-man: doc-man mkdir -p $(DESTDIR)$(mandir)/man1 \ - $(DESTDIR)$(mandir)/man5 + $(DESTDIR)$(mandir)/man5 \ + $(DESTDIR)$(mandir)/man7 for doc in $(MANDOC); do \ sed 's#++SYSCONFDIR++#$(sysconfdir)#' < "$$doc" > "$$doc+"; \ case "$$doc" in \ *.1) install -p -m 0644 "$$doc+" "$(DESTDIR)$(mandir)/man1/$$doc" ;; \ *.5) install -p -m 0644 "$$doc+" "$(DESTDIR)$(mandir)/man5/$$doc" ;; \ + *.7) install -p -m 0644 "$$doc+" "$(DESTDIR)$(mandir)/man7/$$doc" ;; \ esac; \ $(RM) "$$doc+"; \ done +install-release-doc-man: + GIT_INDEX_FILE=.tmp-doc-index git read-tree origin/release + GIT_INDEX_FILE=.tmp-doc-index git checkout-index -f --prefix=./ $(MANDOC) + rm -f .tmp-doc-index + $(MAKE) install-doc-man + install-doc-html: doc-html mkdir -p $(DESTDIR)$(docdir)/tig for doc in $(HTMLDOC); do \ @@ -93,7 +103,14 @@ install-doc-html: doc-html $(RM) "$$doc+"; \ done +install-release-doc-html: + GIT_INDEX_FILE=.tmp-doc-index git read-tree origin/release + GIT_INDEX_FILE=.tmp-doc-index git checkout-index -f --prefix=./ $(HTMLDOC) + rm -f .tmp-doc-index + $(MAKE) install-doc-html + install-doc: install-doc-man install-doc-html +install-release-doc: install-release-doc-man install-release-doc-html clean: $(RM) -r $(TARNAME) *.spec tig-*.tar.gz tig-*.tar.gz.md5 @@ -128,13 +145,17 @@ rpm: dist rpmbuild -ta $(TARNAME).tar.gz configure: configure.ac acinclude.m4 - $(AUTORECONF) -v + $(AUTORECONF) -v -I contrib .PHONY: all all-debug doc doc-man doc-html install install-doc \ install-doc-man install-doc-html clean spell-check dist rpm -tig.o: tig.c -tig: tig.o +io.o: io.c io.h tig.h +graph.o: tig.h +tig.o: tig.c tig.h io.h +tig: tig.o io.o graph.o +test-graph.o: test-graph.c io.h tig.h graph.h +test-graph: io.o graph.o tig.spec: contrib/tig.spec.in sed -e 's/@@VERSION@@/$(RPM_VERSION)/g' \ @@ -150,12 +171,14 @@ manual.toc: manual.txt *) ref="$$ref, $$line" ;; \ esac; done | sed 's/\[\[\(.*\)\]\]/\1/' > $@ -README.html: README asciidoc.conf +README.html: README SITES INSTALL asciidoc.conf $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -a readme $< NEWS.html: NEWS asciidoc.conf $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article $< +tigmanual.7: manual.txt + %.1.html : %.1.txt asciidoc.conf $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d manpage $< @@ -168,6 +191,9 @@ NEWS.html: NEWS asciidoc.conf %.5.xml : %.5.txt asciidoc.conf $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b docbook -d manpage $< +%.7.xml : %.7.txt asciidoc.conf + $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b docbook -d manpage $< + %.html : %.txt asciidoc.conf $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -n $<