summaryrefslogtreecommitdiff
path: root/misc/ascii/patches/patch-aa
blob: 34976902b87104b6194fc44e068d427b436f7e35 (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
$NetBSD: patch-aa,v 1.4 2020/03/07 18:31:03 fcambus Exp $

--- Makefile.orig	2017-08-01 22:51:08.000000000 +0000
+++ Makefile
@@ -2,13 +2,14 @@
 
 VERS=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
 
-CFLAGS = -O
+CFLAGS? = -O
 
 PREFIX = /usr
 
 all: ascii ascii.1
 
 ascii: ascii.c splashscreen.h nametable.h
+	$(LIBTOOL) --mode=link --tag=CC \
 	$(CC) $(CFLAGS) -DREVISION=$(VERS) ascii.c -o ascii
 
 splashscreen.h: splashscreen
@@ -35,8 +36,11 @@ splint:
 	splint +quiet +posixlib $(SPLINT_SUPPRESSIONS) ascii.c
 
 install: ascii ascii.1
-	cp ascii $(DESTDIR)$(PREFIX)/bin/ascii
-	cp ascii.1 $(DESTDIR)$(PREFIX)/share/man/man1
+	$(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PREFIX)/bin
+	$(LIBTOOL) --mode=install \
+		$(BSD_INSTALL_PROGRAM) ascii $(DESTDIR)$(PREFIX)/bin
+	$(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(PREFIX)/$(PKGMANDIR)/man1
+	$(BSD_INSTALL_MAN) ascii.1 $(DESTDIR)$(PREFIX)/$(PKGMANDIR)/man1/ascii.1
 
 uninstall:
 	rm $(DESTDIR)$(PREFIX)/bin/ascii