summaryrefslogtreecommitdiff
path: root/editors/ssam/patches/patch-aa
blob: 552be76e85a2dc27ce65c8758b4004fb8db185b4 (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
$NetBSD: patch-aa,v 1.4 2016/04/01 21:40:06 jperkin Exp $

Use LDFLAGS when linking, just in case we're ELF.
Add DESTDIR support
Make sure "install" is a phony target, so that the file INSTALL isn't
	recognised as install on case-insensitive file systems

--- Makefile.in.orig	1997-10-21 08:28:16.000000000 +0000
+++ Makefile.in
@@ -8,7 +8,7 @@ exec_prefix=@exec_prefix@
 BINDIR=$(exec_prefix)/bin
 LIBDIR=$(exec_prefix)/lib
 INCDIR=$(prefix)/include
-MANDIR=$(prefix)/man
+MANDIR=$(prefix)/${PKGMANDIR}
 
 CC= @CC@
 OPTIM= -g -O
@@ -22,7 +22,7 @@ INSTALL_DATA= @INSTALL_DATA@
 RANLIB= @RANLIB@
 
 $(EXE) : $(OBJS)
-	$(CC) $(OBJS) $(LIBS) -o $(EXE)
+	$(CC) ${LDFLAGS} $(OBJS) $(LIBS) -o $(EXE)
 
 tst: $(EXE)
 	test -d tests || ln -s $(srcdir)/tests .
@@ -170,10 +170,12 @@ distclean:
 	make clean
 	rm -f config.cache config.log config.status Makefile config.h
 
+.PHONY: install
+
 install:
-	$(srcdir)/mkinstalldirs $(BINDIR) $(MANDIR)/man1/
-	$(INSTALL) ssam $(BINDIR)
-	$(INSTALL_DATA) $(srcdir)/ssam.1 $(MANDIR)/man1/
+	$(srcdir)/mkinstalldirs ${DESTDIR}$(BINDIR) ${DESTDIR}$(MANDIR)/man1/
+	$(INSTALL) ssam ${DESTDIR}$(BINDIR)
+	$(INSTALL_DATA) $(srcdir)/ssam.1 ${DESTDIR}$(MANDIR)/man1/
 
 ci:
 	ci -l ssam.c main.c agc.h ssam.h config.h.in Makefile.in configure.in ssam.1