Skip to content

Commit

Permalink
More makefile fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dak180 committed Aug 12, 2013
1 parent 887da31 commit c12a99d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ VERS=$(shell ./autorevision -V | sed '/autorevision /s///')
.md.html:
markdown $< > $@

MANDIR=/usr/local/share/man/man1
BINDIR=/usr/local/bin
prefix?=/usr/local
mandir?=share/man
target=$(DESTDIR)$(prefix)

DOCS = README.md COPYING.md CONTRIBUTING.md autorevision.asciidoc NEWS
SOURCES = autorevision Makefile $(DOCS) control
EXTRA_DIST = autorevision.tmp

all: docs

install: autorevision autorevision.1
install -m755 -D -T autorevision $(DESTDIR)$(BINDIR)/autorevision
gzip < autorevision.1 > $(DESTDIR)$(MANDIR)/autorevision.1.gz
install -d "$(target)/bin"
install -m 755 autorevision $(target)/bin/autorevision
install -d "$(target)/$(mandir)/man1"
gzip < autorevision.1 > $(target)/$(mandir)/man1/autorevision.1.gz

uninstall:
rm -f $(DESTDIR)$(BINDIR)/autorevision $(DESTDIR)$(MANDIR)/autorevision.1.gz
rm -f $(target)/bin/autorevision $(target)/$(mandir)/man1/autorevision.1.gz

autorevision.1: autorevision.asciidoc
a2x -f manpage autorevision.asciidoc
Expand All @@ -31,7 +33,7 @@ autorevision.html: autorevision.asciidoc

autorevision-$(VERS).tgz: $(SOURCES) autorevision.1
mkdir autorevision-$(VERS)
cp -r $(SOURCES) $(EXTRA_DIST) autorevision-$(VERS)
cp -r $(SOURCES) autorevision-$(VERS)
COPYFILE_DISABLE=1; export COPYFILE_DISABLE; \
tar -czf autorevision-$(VERS).tgz autorevision-$(VERS)
rm -fr autorevision-$(VERS)
Expand Down

0 comments on commit c12a99d

Please sign in to comment.