File: 10-Makefile-install-target-fix.patch

package info (click to toggle)
aggregate 1.6-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212 kB
  • sloc: ansic: 641; sh: 153; makefile: 134; perl: 24
file content (39 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download
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
From: "erik@debian.org" <erik@debian.org>
Date: Tue, 28 Jan 2025 03:09:14 +0100
Subject: Makefile fix install target

---
 Makefile.in | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 6cc9c70..a43d091 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -28,6 +28,9 @@ LIBS = @LIBS@
 CFLAGS = -O
 LDFLAGS = -s
 prefix = @prefix@
+DESTDIR = 
+PREFIX   = $(DESTDIR)$(prefix)
+MANDIR   = $(DESTDIR)${prefix}/share/man
 
 SHELL = /bin/sh
 
@@ -41,10 +44,12 @@ clean:
 	rm -f *.o
 
 install: $(PROGS)
-	$(INSTALL) -m 0755 aggregate $(prefix)/bin/
-	$(INSTALL) -m 0644 aggregate.1 $(prefix)/man/man1/
-	$(INSTALL) -m 0755 aggregate-ios $(prefix)/bin/
-	$(INSTALL) -m 0644 aggregate-ios.1 $(prefix)/man/man1/
+	mkdir -p $(PREFIX)/bin/
+	mkdir -p $(MANDIR)/man1/
+	$(INSTALL) -m 0755 aggregate $(PREFIX)/bin/
+	$(INSTALL) -m 0644 aggregate.1 $(MANDIR)/man1/
+	$(INSTALL) -m 0755 aggregate-ios $(PREFIX)/bin/
+	$(INSTALL) -m 0644 aggregate-ios.1 $(MANDIR)/man1/
 
 .c.o:
 	$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<