File: 0002-Makefile-misc-fixes.patch

package info (click to toggle)
camljava 0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 260 kB
  • ctags: 259
  • sloc: ansic: 813; ml: 333; java: 302; makefile: 86
file content (69 lines) | stat: -rw-r--r-- 1,734 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
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
From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Thu, 26 Nov 2009 14:01:59 +0100
Subject: [PATCH] Makefile misc fixes

- ensure files created during build are removed upon clean
- split byte/opt targets to ease build and install on non-native archs
---
 Makefile      |    2 ++
 lib/Makefile  |    5 +++--
 test/Makefile |    3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index be1060f..6dc07b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 all:
 	cd lib; $(MAKE) all
+byte:
+	cd lib; $(MAKE) byte
 
 install:
 	cd lib; $(MAKE) install
diff --git a/lib/Makefile b/lib/Makefile
index bf56bcc..9f63867 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -7,10 +7,11 @@ OCAMLLIB=`ocamlc -where`
 CAMLJAVALIB=$(OCAMLLIB)/camljava
 
 all: jni.cma jni.cmxa javaclasses
+byte: jni.cma javaclasses
 
 install:
 	mkdir -p $(CAMLJAVALIB)
-	cp jni.cma jni.cmi jni.cmxa jni.a libcamljni.a jni.mli $(CAMLJAVALIB)
+	cp jni.cma jni.cmi $(wildcard jni.cmxa jni.a) libcamljni.a jni.mli $(CAMLJAVALIB)
 	jar cf $(CAMLJAVALIB)/camljava.jar fr/inria/caml/camljava/*.class
 
 jni.cma: jni.cmo libcamljni.a
@@ -46,7 +47,7 @@ clean::
 	rm -f fr/inria/caml/camljava/*.class
 
 clean::
-	rm -f *.cm? *.[oa]
+	rm -f *.cm? *.[oa] *.cmxa
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
 
diff --git a/test/Makefile b/test/Makefile
index 78eca4c..2e1be64 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -3,7 +3,7 @@ include ../Makefile.config
 CAMLJAVA=`ocamlc -where`/camljava/camljava.jar
 
 all: jnitest Test.class Testcb.class
-	./jnitest
+	CLASSPATH=. ./jnitest
 
 jnitest: jnitest.ml
 	ocamlc -ccopt -g -o jnitest -I +camljava jni.cma jnitest.ml
@@ -18,3 +18,4 @@ clean::
 
 clean::
 	rm -f *.cm?
+	rm -f *.class
--