Browse files

Changed download process so that all of the jar files

except the jline jar are now version tagged. Skipped
doing this to jline since it would be a pain at runtime
in the windows C program.
Checked in the windows binaries so that I can do a release
without having to rebuild the C code.
  • Loading branch information...
1 parent accd1f1 commit aa58cbdccd5d5c45b6418217aa3f800c6aacfadc @russolsen committed Oct 7, 2011
Showing with 46 additions and 4 deletions.
  1. BIN bin/clj.exe
  2. BIN bin/cljw.exe
  3. +29 −3 build.xml
  4. +4 −0 c_src/Makefile
  5. +13 −1 c_src/paths.c
View
BIN bin/clj.exe
Binary file not shown.
View
BIN bin/cljw.exe
Binary file not shown.
View
32 build.xml
@@ -17,14 +17,38 @@
classpathref="ivy.lib.path" />
</target>
+<!--
+ <conf name="jline"
+ description="Just just jline"/>
+
+ <conf name="minimal-1.2.1c"
+ description="Just clojure 1.2, no contrib libraries"/>
+
+ <conf name="complete-1.2.1c"
+ extends="minimal-1.2.1c"
+ description="Clojure 1.2, plus contrib libraries"/>
+
+ <conf name="minimal-1.3.0c"
+ description="Just clojure, no contrib libraries"/>
+
+ <conf name="complete-1.3.0c"
+ extends="minimal-1.3.0c"
+ description="Clojure plus all the contribs"/>
+-->
+
+ <property name="pattern-with-rev"
+ value="${basedir}/downloads/[conf]/[artifact]-[revision].[ext]"/>
+
<target name="downloads" depends="install-ivy">
- <ivy:retrieve pattern="${basedir}/downloads/[conf]/[artifact].[ext]"/>
+ <ivy:retrieve pattern="${pattern-with-rev}"/>
</target>
<target name="init" depends="downloads"/>
<target name="clj.exe" depends="init">
- <exec dir="c_src" executable="make"/>
+ <exec dir="c_src" executable="make">
+ <arg value="release"/>
+ </exec>
</target>
<macrodef name="create-dejour-release">
@@ -40,7 +64,7 @@
</fileset>
</copy>
- <copy todir="build/@{name}/syslib" flatten="true">
+ <copy tofile="build/@{name}/syslib/jline.jar" flatten="true">
<fileset dir="${basedir}">
<include name="downloads/jline/jline*.jar"/>
</fileset>
@@ -84,6 +108,8 @@
<create-dejour-release ivy-conf-name="complete-1.3.0c"/>
</target>
+ <target name="everything" depends="clj.exe, all"/>
+
<macrodef name="test-dejour-release">
<attribute name="ivy-conf-name"/>
<attribute name="name" default="dejour-@{ivy-conf-name}"/>
View
4 c_src/Makefile
@@ -4,6 +4,10 @@ regular_objects := args.o classpath.o main.o
all: install
+release: install
+ rm -f ../bin/cljw.exe ../bin/clj.exe
+ cp cljw.exe clj.exe ../bin
+
install: cljw.exe clj.exe
paths_no_console.o: main.c
View
14 c_src/paths.c
@@ -7,11 +7,13 @@
static char *base_dir;
static char *lib_dir;
+static char *sys_lib_dir;
static char *jline_jar;
static char *clojure_jar;
static char *java_cmd;
char *get_base_dir() { return base_dir; }
+char *get_sys_lib_dir() { return sys_lib_dir; }
char *get_lib_dir() { return lib_dir; }
char *get_jline_jar() { return jline_jar; }
char *get_clojure_jar() { return clojure_jar; }
@@ -57,6 +59,15 @@ static char *compute_lib_dir() {
}
/**
+ * Return the path to the system lib directory.
+ */
+static char *compute_sys_lib_dir() {
+ char* path = compute_base_dir();
+ strcat( path, "\\syslib");
+ return path;
+}
+
+/**
* Get the path to the clojure.jar file.
*/
static char *compute_clojure_jar( ) {
@@ -69,7 +80,7 @@ static char *compute_clojure_jar( ) {
* Get the path to the jline.jar file.
*/
static char *compute_jline_jar( ) {
- char* path = compute_lib_dir();
+ char* path = compute_sys_lib_dir();
strcat( path, "\\jline.jar");
return path;
}
@@ -100,6 +111,7 @@ static char *compute_java_cmd( ) {
void initPaths() {
base_dir = compute_base_dir();
lib_dir = compute_lib_dir();
+ sys_lib_dir = compute_sys_lib_dir();
jline_jar = compute_jline_jar();
clojure_jar = compute_clojure_jar();
java_cmd = compute_java_cmd();

0 comments on commit aa58cbd

Please sign in to comment.