summaryrefslogtreecommitdiff
path: root/lang/caml-light/patches/patch-an
blob: 13b2f38645642b47c7181c11a34eb780c5135e5c (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
$NetBSD: patch-an,v 1.1 2008/09/05 02:07:51 dholland Exp $

destdir support.

--- launch/Makefile~	1995-02-22 04:33:26.000000000 -0500
+++ launch/Makefile	2008-09-04 21:32:35.000000000 -0400
@@ -10,19 +10,20 @@ all: camlc camllight camlmktop camlexec 
 # Also, "make install" is done with root permissions, meaning that we don't
 # have write permission in the current directory if NFS-mounted...
 
+#	(echo "#!$(BINDIR)/camlrun"; \
+#	 echo "exit 2"; \
+#	 cat testprog) > /tmp/testscr
+#	chmod a+x /tmp/testscr
+#	sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
+#               then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \
+#               else cp camlexec $(LIBDIR)/header; \
+#               fi'
+#	rm -f /tmp/testscr
 install:
-	(echo "#!$(BINDIR)/camlrun"; \
-	 echo "exit 2"; \
-	 cat testprog) > /tmp/testscr
-	chmod a+x /tmp/testscr
-	sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
-               then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \
-               else cp camlexec $(LIBDIR)/header; \
-               fi'
-	rm -f /tmp/testscr
+	echo "#!$(BINDIR)/camlrun" > $(DESTDIR)$(LIBDIR)/header
 	for script in camlc camllight camlmktop; do \
-	  cp $$script $(BINDIR)/$$script; \
-	  chmod a+x $(BINDIR)/$$script; \
+	  cp $$script $(DESTDIR)$(BINDIR)/$$script; \
+	  chmod a+x $(DESTDIR)$(BINDIR)/$$script; \
 	done
 
 SEDCOMMANDS=\