~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tig-0.10.1.git
[tig]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
cee61d8
..
c2d6b60
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-7,9
+7,10
@@
all:
prefix ?= $(HOME)
bindir ?= $(prefix)/bin
prefix ?= $(HOME)
bindir ?= $(prefix)/bin
-mandir ?= $(prefix)/man
datarootdir ?= $(prefix)/share
datarootdir ?= $(prefix)/share
+sysconfdir ?= $(prefix)/etc
docdir ?= $(datarootdir)/doc
docdir ?= $(datarootdir)/doc
+mandir ?= $(datarootdir)/man
# DESTDIR=
# Get version either via git or from VERSION file. Allow either
# DESTDIR=
# Get version either via git or from VERSION file. Allow either
@@
-38,12
+39,21
@@
PROGS = tig
MANDOC = tig.1 tigrc.5
HTMLDOC = tig.1.html tigrc.5.html manual.html README.html
ALLDOC = $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf
MANDOC = tig.1 tigrc.5
HTMLDOC = tig.1.html tigrc.5.html manual.html README.html
ALLDOC = $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf
+
+# Never include the release number in the tarname for tagged
+# versions.
+ifneq ($(if $(DIST_VERSION),$(words $(RPM_VERLIST))),2)
TARNAME = tig-$(RPM_VERSION)-$(RPM_RELEASE)
TARNAME = tig-$(RPM_VERSION)-$(RPM_RELEASE)
+else
+TARNAME = tig-$(RPM_VERSION)
+endif
-override CFLAGS += '-DTIG_VERSION="$(VERSION)"'
+override CPPFLAGS += '-DTIG_VERSION="$(VERSION)"'
+override CPPFLAGS += '-DSYSCONFDIR="$(sysconfdir)"'
AUTORECONF ?= autoreconf
ASCIIDOC ?= asciidoc
AUTORECONF ?= autoreconf
ASCIIDOC ?= asciidoc
+ASCIIDOC_FLAGS = -aversion=$(VERSION) -asysconfdir=$(sysconfdir)
XMLTO ?= xmlto
DOCBOOK2PDF ?= docbook2pdf
XMLTO ?= xmlto
DOCBOOK2PDF ?= docbook2pdf
@@
-145,35
+155,32
@@
manual.toc: manual.txt
*) ref="$$ref, $$line" ;; \
esac; done | sed 's/\[\[\(.*\)\]\]/\1/' > $@
*) ref="$$ref, $$line" ;; \
esac; done | sed 's/\[\[\(.*\)\]\]/\1/' > $@
-README.html: README
- $(ASCIIDOC) -b xhtml11 -d article -a readme $<
-
-%.pdf : %.xml
- $(DOCBOOK2PDF) $<
-
-%.1.html : %.1.txt
- $(ASCIIDOC) -b xhtml11 -d manpage $<
+README.html: README asciidoc.conf
+ $(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -a readme $<
-%.1.
xml : %.1.txt
- $(ASCIIDOC)
-b docbook -d manpage -aversion=$(VERSION)
$<
+%.1.
html : %.1.txt asciidoc.conf
+ $(ASCIIDOC)
$(ASCIIDOC_FLAGS) -b xhtml11 -d manpage
$<
-%.1
: %.1.xml
- $(
XMLTO) -m manpage.xsl man
$<
+%.1
.xml : %.1.txt asciidoc.conf
+ $(
ASCIIDOC) $(ASCIIDOC_FLAGS) -b docbook -d manpage
$<
-%.5.html : %.5.txt
- $(ASCIIDOC) -b xhtml11 -d manpage $<
+%.5.html : %.5.txt
asciidoc.conf
+ $(ASCIIDOC)
$(ASCIIDOC_FLAGS)
-b xhtml11 -d manpage $<
-%.5.xml : %.5.txt
- $(ASCIIDOC)
-b docbook -d manpage -aversion=$(VERSION)
$<
+%.5.xml : %.5.txt
asciidoc.conf
+ $(ASCIIDOC)
$(ASCIIDOC_FLAGS) -b docbook -d manpage
$<
-%.
5 : %.5.xml
- $(
XMLTO) -m manpage.xsl ma
n $<
+%.
html : %.txt asciidoc.conf
+ $(
ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -
n $<
-%.
html : %.txt
- $(ASCIIDOC)
-b xhtml11 -d article -n
$<
+%.
xml : %.txt asciidoc.conf
+ $(ASCIIDOC)
$(ASCIIDOC_FLAGS) -b docbook -d article
$<
-%
.xml : %.txt
- $(
ASCIIDOC) -b docbook -d article
$<
+%
: %.xml
+ $(
XMLTO) man
$<
%.html-chunked : %.xml
$(XMLTO) html -o $@ $<
%.html-chunked : %.xml
$(XMLTO) html -o $@ $<
+
+%.pdf : %.xml
+ $(DOCBOOK2PDF) $<