8000 Merge pull request #101 from rabbitmq/erlang.mk · weixuan2008/rabbitmq-java-client@18a619e · GitHub
[go: up one dir, main page]

Skip to content

Commit 18a619e

Browse files
Merge pull request rabbitmq#101 from rabbitmq/erlang.mk
Switch to Erlang.mk
2 parents a16c0e4 + 0d1b2bd commit 18a619e

File tree

4 files changed

+28
-33
lines changed

4 files changed

+28
-33
lines changed

build.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ javac.out=${build.out}/classes
1212
javadoc.out=build/doc/api
1313
lib.out=${build.out}/lib
1414
python.bin=python
15-
sibling.codegen.dir=../rabbitmq-codegen/
15+
sibling.codegen.dir=../rabbitmq_codegen
16+
sibling.rabbitmq_test.dir=../rabbitmq_test
17+
rabbitmqctl.bin=../rabbit/scripts/rabbitmqctl
1618
spec.version=0.9.1
1719
src.generated=${build.out}/gensrc
1820
standard.javac.source=1.6

build.xml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<property file="build.properties"/>
66
<property file="config.properties"/>
7+
<property environment="env"/>
78

89
<path id="javac.classpath">
910
<!-- cf dist target, infra -->
@@ -111,7 +112,6 @@
111112
</target>
112113

113114
<target name="detect-ssl">
114-
<property environment="env"/>
115115
<property name="SSL_CERTS_DIR" value="${env.SSL_CERTS_DIR}"/>
116116
<available property="SSL_AVAILABLE" file="${SSL_CERTS_DIR}/client"/>
117117
<property name="CLIENT_KEYSTORE_PHRASE" value="bunnies"/>
@@ -120,11 +120,10 @@
120120
</target>
121121

122122
<target name="detect-umbrella">
123-
<available property="UMBRELLA_AVAILABLE" file="../rabbitmq-test"/>
123+
<available property="UMBRELLA_AVAILABLE" file="../../UMBRELLA.md"/>
124124
</target>
125125

126126
<target name="detect-tmpdir">
127-
<property environment="env"/>
128127
<condition property="TMPDIR" value="${env.TMPDIR}" else="/tmp">
129128
<available file="${env.TMPDIR}" type="dir"/>
130129
</condition>
@@ -183,6 +182,10 @@
183182
<target name="test-prepare">
184183
<property name="haltOnFailureJunit" value="yes" />
185184
<property name="haltOnFailureJava" value="true" />
185+
186+
<condition property="make.bin" value="${env.MAKE}" else="make">
187+
<isset property="env.MAKE"/>
188+
</condition>
186189
</target>
187190

188191
<target name="test-build" depends="test-prepare">
@@ -334,6 +337,10 @@
334337
failureproperty="test.failure"
335338
fork="yes">
336339
<classpath refid="test.classpath"/>
340+
<jvmarg value="-Dmake.bin=${make.bin}"/>
341+
<jvmarg value="-Drabbitmqctl.bin=${rabbitmqctl.bin}"/>
342+
<jvmarg value="-Dsibling.rabbitmq_test.dir=${sibling.rabbitmq_test.dir}"/>
343+
337344
<jvmarg value="-Dkeystore.path=${CLIENT_KEYSTORE}"/>
338345
<jvmarg value="-Dkeystore.empty.path=${CLIENT_KEYSTORE_EMPTY}"/>
339346
<jvmarg value="-Dkeystore.passwd=${CLIENT_KEYSTORE_PHRASE}"/>
@@ -354,6 +361,9 @@
354361
failureproperty="test.failure"
355362
fork="yes">
356363
<classpath refid="test.classpath"/>
364+
<jvmarg value="-Dmake.bin=${make.bin}"/>
365+
<jvmarg value="-Drabbitmqctl.bin=${rabbitmqctl.bin}"/>
366+
<jvmarg value="-Dsibling.rabbitmq_test.dir=${sibling.rabbitmq_test.dir}"/>
357367

358368
<formatter type="plain"/>
359369
<formatter type="xml"/>
@@ -367,6 +377,10 @@
367377
failureproperty="test.failure"
368378
fork="yes">
369379
<classpath refid="test.classpath"/>
380+
<jvmarg value="-Dmake.bin=${make.bin}"/>
381+
<jvmarg value="-Drabbitmqctl.bin=${rabbitmqctl.bin}"/>
382+
<jvmarg value="-Dsibling.rabbitmq_test.dir=${sibling.rabbitmq_test.dir}"/>
383+
370384
<formatter type="plain"/>
371385
<formatter type="xml"/>
372386
<test todir="${build.out}"
@@ -381,6 +395,10 @@
381395
failureproperty="test.failure"
382396
fork="yes">
383397
<classpath refid="test.classpath"/>
398+
<jvmarg value="-Dmake.bin=${make.bin}"/>
399+
<jvmarg value="-Drabbitmqctl.bin=${rabbitmqctl.bin}"/>
400+
<jvmarg value="-Dsibling.rabbitmq_test.dir=${sibling.rabbitmq_test.dir}"/>
401+
384402
<formatter type="plain"/>
385403
<formatter type="xml"/>
386404
<test todir="${build.out}" name="com.rabbitmq.client.test.server.HATests"/>

codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re
1919
import sys
2020

21-
sys.path.append("../rabbitmq-codegen") # in case we're next to an experimental revision
21+
sys.path.append("../rabbitmq_codegen") # in case we're next to an experimental revision
2222
sys.path.append("codegen") # in case we're building from a distribution package
2323

2424
from amqp_codegen import *

test/src/com/rabbitmq/tools/Host.java

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,42 +106,17 @@ public static Process invokeMakeTarget(String command) throws IOException {
106106

107107
private static String makeCommand()
108108
{
109-
// Get the make(1) executable to use from the environment:
110-
// make(1) provides the path to itself in $MAKE.
111-
String makecmd = System.getenv("MAKE");
112-
113-
// Default to "make" if the environment variable is unset.
114-
if (makecmd == null) {
115-
makecmd = "make";
116-
}
117-
118-
return makecmd;
109+
return System.getProperty("make.bin");
119110
}
120111

121112
private static String rabbitmqctlCommand()
122113
{
123-
// Get the rabbitmqctl(1) executable to use from the environment.
124-
String cmd = System.getenv("RABBITMQCTL");
125-
126-
// Default to "make" if the environment variable is unset.
127-
if (cmd == null) {
128-
cmd = "../rabbitmq-server/scripts/rabbitmqctl";
129-
}
130-
131-
return cmd;
114+
return System.getProperty("rabbitmqctl.bin");
132115
}
133116

134117
private static String rabbitmqTestDir()
135118
{
136-
// Get the rabbitmq-test directory to use from the environment.
137-
String dir = System.getenv("RABBITMQ_TEST_DIR");
138-
139-
// Default to "make" if the environment variable is unset.
140-
if (dir == null) {
141-
dir = "../rabbitmq-test";
142-
}
143-
144-
return dir;
119+
return System.getProperty("sibling.rabbitmq_test.dir");
145120
}
146121

147122
public static void closeConnection(String pid) throws IOException {

0 commit comments

Comments
 (0)
0