summaryrefslogtreecommitdiff
path: root/lang/kali/patches/patch-aa
blob: 24dca7750121efa1b3a33f5e8b0609229b9a6f66 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
$NetBSD: patch-aa,v 1.3 2010/08/21 14:16:18 asau Exp $

Staged installation support.

--- Makefile.in.orig	1999-02-12 16:42:56.000000000 +0300
+++ Makefile.in	2010-08-21 18:09:54.000000000 +0400
@@ -98,7 +98,7 @@
 
 # The following is the first rule and therefore the "make" command's
 # default target.
-enough: $(VM) $(IMAGE) go .notify
+enough: $(VM) $(IMAGE) go
 
 # The developers are curious to know.  Don't be concerned if this fails.
 .notify: build/minor-version-number
@@ -150,21 +150,21 @@
 install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc inst-image
 
 inst-vm:
-	$(INSTALL_PROGRAM) $(VM) $(LIB)
+	$(INSTALL_PROGRAM) $(VM) $(DESTDIR)$(LIB)
 
 inst-image:
 	rm -f '/tmp/$(IMAGE)' &&					\
 	build/build-usual-image . '$(LIB)' '/tmp/$(IMAGE)' './$(VM)'	\
 		'$(INITIAL)' &&						\
-	$(INSTALL_DATA) /tmp/$(IMAGE) $(LIB) &&				\
+	$(INSTALL_DATA) /tmp/$(IMAGE) $(DESTDIR)$(LIB) &&		\
 	rm /tmp/$(IMAGE)
 
 inst-man:
-	if [ -d $(mandir) -a -w $(mandir) ]; then			   \
+	if [ -d $(DESTDIR)$(mandir) -a -w $(DESTDIR)$(mandir) ]; then	   \
 		sed 's=LBIN=$(bindir)=g' doc/scheme48.man |		   \
 			sed 's=LLIB=$(LIB)=g' |				   \
 			sed 's=LS48=$(RUNNABLE)=g' >$(MANPAGE) &&	   \
-		$(INSTALL_DATA) $(MANPAGE) $(mandir) &&			   \
+		$(INSTALL_DATA) $(MANPAGE) $(DESTDIR)$(mandir) &&	   \
 		rm $(MANPAGE);						   \
 	else								   \
 		echo "$(mandir) not writable dir, not installing man page" \
@@ -172,26 +172,26 @@
 	fi
 
 inst-inc:
-	$(INSTALL_DATA) c/kali.h $(incdir)
+	$(INSTALL_DATA) c/kali.h $(DESTDIR)$(incdir)
 
 inst-misc:
 	for stub in env big opt misc link; do				\
 		for f in scheme/$$stub/*.scm; do			\
-			$(INSTALL_DATA) $$f $(LIB)/$$stub || exit 1;	\
+			$(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/$$stub || exit 1;	\
 		done;							\
 	done &&								\
 	for f in scheme/rts/*num.scm scheme/rts/jar-defrecord.scm; do	\
-		$(INSTALL_DATA) $$f $(LIB)/rts || exit 1;		\
+		$(INSTALL_DATA) $$f $(DESTDIR)$(LIB)/rts || exit 1;	\
 	done &&
 
 inst-script:
 	script=$(bindir)/$(RUNNABLE) &&					\
-	echo '#!/bin/sh'	>$$script &&				\
-	echo			>>$$script &&				\
-	echo 'lib=$(LIB)'	>>$$script &&				\
+	(echo '#!/bin/sh' &&						\
+	echo				 &&				\
+	echo 'lib=$(LIB)'		 &&				\
 	echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"'	\
-				>>$$script &&				\
-	chmod +x $$script
+				)>>$(DESTDIR)$$script &&		\
+	chmod +x $(DESTDIR)$$script
 
 # Script to run kali in this directory.
 go:
@@ -204,17 +204,17 @@
 
 dirs:
 	for dir in $(libdir) $(bindir) $(incdir); do			 \
-		[ -d $$dir -a -w $$dir ] || {				 \
+		[ -d $(DESTDIR)$$dir -a -w $(DESTDIR)$$dir ] || {	 \
 			echo "$$dir not a writable directory" >&2;	 \
 			exit 1;						 \
 		};							 \
 	done
-	{ mkdir -p $(LIB) && [ -w $(LIB) ]; } || {			 \
+	{ mkdir -p $(DESTDIR)$(LIB) && [ -w $(DESTDIR)$(LIB) ]; } || {	 \
 		echo "$(LIB) not a writable directory" >&2;		 \
 		exit 1;							 \
 	}
 	for dir in rts env big opt misc link; do			  \
-		{ mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || {	  \
+		{ mkdir -p $(DESTDIR)$(LIB)/$$dir && [ -w $(DESTDIR)$(LIB)/$$dir ]; } || {	  \
 			echo "$(LIB)/$$dir not a writable directory" >&2; \
 			exit 1;						  \
 		};							  \