From 2b37ea2434de6e5afd3f7fd99a1fa74f91806e24 Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Thu, 2 Jan 2014 02:37:49 +0100
Subject: [PATCH] moved everything around to prepare to mavenize

---
 SConstruct                                                  | 1 +
 src/bindings/java/SConscript                                | 6 +++---
 .../main/java}/com/upstandinghackers/hammer/Action.java     | 0
 .../main/java}/com/upstandinghackers/hammer/Hammer.java     | 0
 .../java}/com/upstandinghackers/hammer/ParseResult.java     | 0
 .../java}/com/upstandinghackers/hammer/ParsedToken.java     | 0
 .../main/java}/com/upstandinghackers/hammer/Parser.java     | 0
 .../main/java}/com/upstandinghackers/hammer/Predicate.java  | 0
 .../main/native}/com_upstandinghackers_hammer_Hammer.c      | 0
 .../main/native}/com_upstandinghackers_hammer_ParseResult.c | 0
 .../main/native}/com_upstandinghackers_hammer_ParsedToken.c | 0
 .../main/native}/com_upstandinghackers_hammer_Parser.c      | 0
 src/bindings/java/{csrc => src/main/native}/jhammer.h       | 2 +-
 13 files changed, 5 insertions(+), 4 deletions(-)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/Action.java (100%)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/Hammer.java (100%)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/ParseResult.java (100%)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/ParsedToken.java (100%)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/Parser.java (100%)
 rename src/bindings/java/{jsrc => src/main/java}/com/upstandinghackers/hammer/Predicate.java (100%)
 rename src/bindings/java/{csrc => src/main/native}/com_upstandinghackers_hammer_Hammer.c (100%)
 rename src/bindings/java/{csrc => src/main/native}/com_upstandinghackers_hammer_ParseResult.c (100%)
 rename src/bindings/java/{csrc => src/main/native}/com_upstandinghackers_hammer_ParsedToken.c (100%)
 rename src/bindings/java/{csrc => src/main/native}/com_upstandinghackers_hammer_Parser.c (100%)
 rename src/bindings/java/{csrc => src/main/native}/jhammer.h (97%)

diff --git a/SConstruct b/SConstruct
index 62a6b503..9f1e872b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -17,6 +17,7 @@ env = Environment(ENV = {'PATH' : os.environ['PATH']},
 if not 'bindings' in env:
     env['bindings'] = []
 
+# FIXME this bit doesn't work unless JAVA_HOME is set
 if 'java' in env['bindings']:
     from ConfigureJNI import ConfigureJNI
     if not ConfigureJNI(env):
diff --git a/src/bindings/java/SConscript b/src/bindings/java/SConscript
index 26444c99..8a2af42e 100644
--- a/src/bindings/java/SConscript
+++ b/src/bindings/java/SConscript
@@ -15,10 +15,10 @@ csources = [
     "com_upstandinghackers_hammer_ParseResult.c"   
 ]
 
-classes = javaenv.Java(target = 'classes', source = '#src/bindings/java/jsrc')
-jni_headers = javaenv.JavaH(target = 'csrc', source = classes)
+classes = javaenv.Java(target = 'classes', source = '#src/bindings/java/src/main/java')
+jni_headers = javaenv.JavaH(target = 'src/main/native', source = classes)
 
-native_src = PrependDir('csrc', csources)
+native_src = PrependDir('src/main/native', csources)
 libhammer_java = javaenv.SharedLibrary('libjhammer', native_src, LIBS=['hammer'], LIBPATH='../../')
 hammer_jar = javaenv.Jar('hammer.jar', 'classes')
 Default(libhammer_java, hammer_jar)
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/Action.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/Action.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/Action.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/Action.java
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/Hammer.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/Hammer.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/Hammer.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/Hammer.java
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/ParseResult.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/ParseResult.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/ParseResult.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/ParseResult.java
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/ParsedToken.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/ParsedToken.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/ParsedToken.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/ParsedToken.java
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/Parser.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/Parser.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/Parser.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/Parser.java
diff --git a/src/bindings/java/jsrc/com/upstandinghackers/hammer/Predicate.java b/src/bindings/java/src/main/java/com/upstandinghackers/hammer/Predicate.java
similarity index 100%
rename from src/bindings/java/jsrc/com/upstandinghackers/hammer/Predicate.java
rename to src/bindings/java/src/main/java/com/upstandinghackers/hammer/Predicate.java
diff --git a/src/bindings/java/csrc/com_upstandinghackers_hammer_Hammer.c b/src/bindings/java/src/main/native/com_upstandinghackers_hammer_Hammer.c
similarity index 100%
rename from src/bindings/java/csrc/com_upstandinghackers_hammer_Hammer.c
rename to src/bindings/java/src/main/native/com_upstandinghackers_hammer_Hammer.c
diff --git a/src/bindings/java/csrc/com_upstandinghackers_hammer_ParseResult.c b/src/bindings/java/src/main/native/com_upstandinghackers_hammer_ParseResult.c
similarity index 100%
rename from src/bindings/java/csrc/com_upstandinghackers_hammer_ParseResult.c
rename to src/bindings/java/src/main/native/com_upstandinghackers_hammer_ParseResult.c
diff --git a/src/bindings/java/csrc/com_upstandinghackers_hammer_ParsedToken.c b/src/bindings/java/src/main/native/com_upstandinghackers_hammer_ParsedToken.c
similarity index 100%
rename from src/bindings/java/csrc/com_upstandinghackers_hammer_ParsedToken.c
rename to src/bindings/java/src/main/native/com_upstandinghackers_hammer_ParsedToken.c
diff --git a/src/bindings/java/csrc/com_upstandinghackers_hammer_Parser.c b/src/bindings/java/src/main/native/com_upstandinghackers_hammer_Parser.c
similarity index 100%
rename from src/bindings/java/csrc/com_upstandinghackers_hammer_Parser.c
rename to src/bindings/java/src/main/native/com_upstandinghackers_hammer_Parser.c
diff --git a/src/bindings/java/csrc/jhammer.h b/src/bindings/java/src/main/native/jhammer.h
similarity index 97%
rename from src/bindings/java/csrc/jhammer.h
rename to src/bindings/java/src/main/native/jhammer.h
index 6d32a974..31599fba 100644
--- a/src/bindings/java/csrc/jhammer.h
+++ b/src/bindings/java/src/main/native/jhammer.h
@@ -1,7 +1,7 @@
 #ifndef JHAMMER_H
 #define JHAMMER_H
 #include <jni.h>
-#include "../../../internal.h"
+#include "../../../../../internal.h"
 #include <assert.h>
 
 // Unsafe (non-asserting) helpers
-- 
GitLab