summaryrefslogtreecommitdiff
path: root/devel/cvs-fast-export/patches/patch-Makefile
blob: 59febaf55da7d1290b765ff629025b5304c8c1b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-Makefile,v 1.11 2018/09/26 23:19:05 schmonz Exp $

* Use ${PREFIX} variable.
* Comment out "-march=native"
* Add "all" target.
* Install man pages in ${PREFIX}/${PKGMANDIR}, not ${PREFIX}/share/man.

--- Makefile.orig	2018-07-06 02:37:10.000000000 +0000
+++ Makefile
@@ -17,11 +17,12 @@
 VERSION=1.44
 
 .PATH: $(.PARSEDIR)
-prefix?=/usr/local
+prefix?=$(PREFIX)
 target=$(DESTDIR)$(prefix)
 parsedir:=$(.PARSEDIR)
 srcdir=$(dir $(abspath $(firstword $(MAKEFILE_LIST))))$(parsedir)
 VPATH=$(srcdir)
+mandir=$(PKGMANDIR)
 
 INSTALL = install
 TAR = tar
@@ -40,7 +41,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
@@ -100,6 +101,8 @@ dump.o export.o graph.o main.o collate.o
 
 BISON ?= bison
 
+all: cvs-fast-export cvs-fast-export.1
+
 gram.h gram.c: gram.y
 	$(BISON)  $(YFLAGS) --defines=gram.h --output-file=gram.c $(srcdir)/gram.y
 lex.h lex.c: lex.l
@@ -143,10 +146,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"
 uninstall: uninstall-man uninstall-bin
 uninstall-man:
 	cd $(target)/share/man/man1/ && rm -f cvs-fast-export.1 cvssync.1 cvsconvert.1