$NetBSD: patch-Makefile,v 1.3 2013/08/05 02:10:07 gdt Exp $

* Add "all" target.
* Use ${PREFIX} variable.
* Install man pages in ${PREFIX}/${PKGMANDIR}, not ${PREFIX}/share/man.

--- Makefile.orig	2013-05-22 03:23:56.000000000 +0000
+++ Makefile
@@ -3,8 +3,9 @@
 # Build requirements: A C compiler, yacc, lex, and asciidoc.
 
 INSTALL = install
-prefix?=/usr/local
+prefix=$(PREFIX)
 target=$(DESTDIR)$(prefix)
+mandir=$(PKGMANDIR)
 LEX=/usr/bin/flex
 
 VERSION=0.5
@@ -25,6 +26,8 @@ OBJS=gram.o lex.o main.o cvsutil.o revdi
 	revlist.o atom.o revcvs.o generate.o export.o \
 	nodehash.o tags.o authormap.o graph.o
 
+all: cvs-fast-export cvs-fast-export.1
+
 cvs-fast-export: $(OBJS)
 	cc $(CFLAGS) -o $@ $(OBJS)
 
@@ -56,9 +59,9 @@ clean:
 
 install: cvs-fast-export.1 all
 	$(INSTALL) -d "$(target)/bin"
-	$(INSTALL) -d "$(target)/share/man/man1"
+	$(INSTALL) -d "$(target)/$(mandir)/man1"
 	$(INSTALL) cvs-fast-export "$(target)/bin"
-	$(INSTALL) -m 644 cvs-fast-export.1 "$(target)/share/man/man1"
+	$(INSTALL) -m 644 cvs-fast-export.1 "$(target)/$(mandir)/man1"
 
 # Weird suppressions are required because of strange tricks in Bison.
 SUPPRESSIONS = -U__UNUSED__ -UYYPARSE_PARAM -UYYTYPE_INT16 -UYYTYPE_INT8 \
