aboutsummaryrefslogtreecommitdiff
path: root/system/bonnie++/Makefile.in_DESTDIR.diff
blob: 3b556e0b09f2ef69ac5d4eba445c3f969e300996 (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
Small patch to add DESTDIR support for easier packaging
Use as you wish.  --Robby Workman <rworkman@slackware.com>

--- orig/Makefile.in	2008-02-20 13:53:26.319108308 -0600
+++ new/Makefile.in	2008-02-20 14:17:25.875109567 -0600
@@ -4,6 +4,7 @@
 
 SCRIPTS=bon_csv2html bon_csv2txt
 
+DESTDIR = 
 prefix=@prefix@
 eprefix=@exec_prefix@
 #MORE_WARNINGS=-Weffc++ -Wcast-align
@@ -33,14 +34,14 @@
 	$(CXX) zcav.cpp -o zcav $(ZCAVOBJS) $(LFLAGS)
 
 install-bin: $(EXES)
-	mkdir -p $(eprefix)/bin $(eprefix)/sbin
-	@INSTALL_PROGRAM@ @stripping@ $(EXES) $(eprefix)/sbin
-	@INSTALL_SCRIPT@ $(SCRIPTS) $(eprefix)/bin
+	mkdir -p $(DESTDIR)/$(eprefix)/bin $(DESTDIR)/$(eprefix)/sbin
+	@INSTALL_PROGRAM@ @stripping@ $(EXES) $(DESTDIR)/$(eprefix)/sbin
+	@INSTALL_SCRIPT@ $(SCRIPTS) $(DESTDIR)/$(eprefix)/bin
 
 install: install-bin
-	mkdir -p @mandir@/man1 @mandir@/man8
-	@INSTALL_DATA@ $(MAN1) @mandir@/man1
-	@INSTALL_DATA@ $(MAN8) @mandir@/man8
+	mkdir -p $(DESTDIR)/@mandir@/man1 $(DESTDIR)/@mandir@/man8
+	@INSTALL_DATA@ $(MAN1) $(DESTDIR)/@mandir@/man1
+	@INSTALL_DATA@ $(MAN8) $(DESTDIR)/@mandir@/man8
 
 %.o: %.cpp %.h bonnie.h port.h
 	$(CXX) -c $<