Fix INSTALL
[tig] / Makefile
index 033d104..da9a743 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 ## Makefile for tig
 
+all:
+
 # Include setting from the configure script
 -include config.make
 
@@ -29,7 +31,7 @@ RPM_VERLIST = $(filter-out g% dirty,$(subst -, ,$(VERSION))) 0
 RPM_VERSION = $(word 1,$(RPM_VERLIST))
 RPM_RELEASE = $(word 2,$(RPM_VERLIST))$(if $(WTDIRTY),.dirty)
 
-LDLIBS = -lcurses
+LDLIBS ?= -lcurses
 CFLAGS ?= -Wall -O2
 DFLAGS = -g -DDEBUG -Werror
 PROGS  = tig
@@ -38,10 +40,9 @@ HTMLDOC = tig.1.html tigrc.5.html manual.html README.html
 ALLDOC = $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf
 TARNAME        = tig-$(RPM_VERSION)-$(RPM_RELEASE)
 
-override CFLAGS += '-DVERSION="$(VERSION)"'
+override CFLAGS += '-DTIG_VERSION="$(VERSION)"'
 
-AUTOHEADER ?= autoheader
-AUTOCONF ?= autoconf
+AUTORECONF ?= autoreconf
 ASCIIDOC ?= asciidoc
 XMLTO ?= xmlto
 DOCBOOK2PDF ?= docbook2pdf
@@ -81,13 +82,13 @@ install-doc: install-doc-man install-doc-html
 
 clean:
        rm -rf manual.html-chunked $(TARNAME)
-       rm -f $(PROGS) $(ALLDOC) core *.xml *.toc
+       rm -f $(PROGS) $(ALLDOC) core *.o *.xml *.toc
        rm -f *.spec tig-*.tar.gz tig-*.tar.gz.md5
 
 spell-check:
        aspell --lang=en --check tig.1.txt tigrc.5.txt manual.txt
 
-strip: all
+strip: $(PROGS)
        strip $(PROGS)
 
 dist: tig.spec
@@ -105,8 +106,7 @@ rpm: dist
        rpmbuild -ta $(TARNAME).tar.gz
 
 configure: configure.ac
-       $(AUTOHEADER)
-       $(AUTOCONF)
+       $(AUTORECONF) -v
 
 # Maintainer stuff
 release-doc:
@@ -125,12 +125,13 @@ release-dist: release-doc
 .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
+
 tig.spec: contrib/tig.spec.in
        sed -e 's/@@VERSION@@/$(RPM_VERSION)/g' \
            -e 's/@@RELEASE@@/$(RPM_RELEASE)/g' < $< > $@
 
-tig: tig.c
-
 manual.html: manual.toc
 manual.toc: manual.txt
        sed -n '/^\[\[/,/\(---\|~~~\)/p' < $< | while read line; do \