$NetBSD: patch-Makefile,v 1.6 2014/04/04 20:20:42 ryoon Exp $

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

--- Makefile.orig	2014-12-17 15:04:54.000000000 +0000
+++ Makefile
@@ -9,6 +9,7 @@
 VERSION=1.29
 
 prefix?=/usr/local
+mandir?=share/man
 target=$(DESTDIR)$(prefix)
 srcdir=$(dir $(abspath $(firstword $(MAKEFILE_LIST))))
 VPATH=$(srcdir)
@@ -29,7 +30,7 @@ CFLAGS += -pthread
 CPPFLAGS += -DTHREADS
 
 # Optimizing for speed. Comment this out for distribution builds
-CFLAGS += -march=native
+#CFLAGS += -march=native
 
 # To enable debugging of the Yacc grammar, uncomment the following line
 #CPPFLAGS += -DYYDEBUG=1
@@ -77,6 +78,8 @@ OBJS=gram.o lex.o rbtree.o main.o import
 	cvsutil.o revdir.o revlist.o atom.o revcvs.o generate.o export.o \
 	nodehash.o tags.o authormap.o graph.o utils.o merge.o hash.o
 
+all: cvs-fast-export cvs-fast-export.1
+
 cvs-fast-export: $(OBJS)
 	$(CC) $(CFLAGS) $(TARGET_ARCH) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
 
@@ -128,10 +131,10 @@ install-bin: cvs-fast-export cvssync cvs
 	$(INSTALL) -d "$(target)/bin"
 	$(INSTALL) $^ "$(target)/bin"
 install-man: man
-	$(INSTALL) -d "$(target)/share/man/man1"
-	$(INSTALL) -m 644 cvs-fast-export.1 "$(target)/share/man/man1"
-	$(INSTALL) -m 644 cvssync.1 "$(target)/share/man/man1"
-	$(INSTALL) -m 644 cvsconvert.1 "$(target)/share/man/man1"
+	$(INSTALL) -d "$(target)/$(mandir)/man1"
+	$(INSTALL) -m 644 cvs-fast-export.1 "$(target)/$(mandir)/man1"
+	$(INSTALL) -m 644 cvssync.1 "$(target)/$(mandir)/man1"
+	$(INSTALL) -m 644 cvsconvert.1 "$(target)/$(mandir)/man1"
 
 PROFILE_REPO = ~/software/groff-conversion/groff-mirror/groff
 gmon.out: cvs-fast-export
