Permalink
Browse files

Phew, it works with every driver now..

  • Loading branch information...
1 parent c3fc5fa commit 01067fd837de5846346ab1c75ec5d5514e8e883a @nddrylliog nddrylliog committed Feb 19, 2013
@@ -110,10 +110,10 @@ AndroidDriver: class extends Driver {
uze := UseDef parse(sourceFolder identifier, params)
if (uze) {
for (additional in uze additionals) {
- cPath := additional relative path
+ cPath := File new(uze identifier, additional relative path) path
if (params verbose) {
- "cPath: %s" printfln(cPath)
+ "cPath for additional: %s" printfln(cPath)
}
fw write(cPath). write(" ")
@@ -190,4 +190,8 @@ AndroidDriver: class extends Driver {
sourceFoldersDone
}
+ doublePrefix: func -> Bool {
+ true
+ }
+
}
@@ -36,10 +36,19 @@ Driver: abstract class {
for(inc: Include in module includes) {
if(inc mode == IncludeMode LOCAL) {
base := params libcache ? params libcachePath : params outPath path
- dest := File new(base, module getSourceFolderName())
+ if (doublePrefix()) {
+ base = File new(base, module getUseDef() identifier) path
+ }
+
+ destDir := File new(base, module getSourceFolderName())
- File new(pathElement, inc path + ".h") copyTo(
- File new(dest, inc path + ".h"))
+ src := File new(pathElement, inc path + ".h")
+ dest := File new(destDir, inc path + ".h")
+
+ if (params verbose) {
+ "Copying %s to %s" printfln(src path, dest path)
+ }
+ src copyTo(dest)
}
}
@@ -56,7 +65,14 @@ Driver: abstract class {
for (additional in useDef additionals) {
src := additional absolute
- dest := File new(File new(params libcachePath, useDef identifier), additional relative)
+
+ base := params libcachePath
+ if (doublePrefix()) {
+ base = File new(base, useDef identifier) path
+ }
+
+ destDir := File new(base, useDef identifier)
+ dest := File new(destDir, additional relative)
if (params verbose) {
"Copying %s to %s" printfln(src path, dest path)
@@ -134,4 +150,8 @@ Driver: abstract class {
usesDone
}
+ doublePrefix: func -> Bool {
+ false
+ }
+
}
@@ -75,13 +75,16 @@ Module: class extends Node {
getUnderName: func -> String { underName }
getPathElement: func -> String { pathElement }
getSourceFolderName: func -> String {
+ "ooc/%s" format(getUseDef() identifier)
+ }
+
+ getUseDef: func -> UseDef {
uze := params sourcePathTable get(pathElement)
if (!uze) {
message := "Module that has no corresponding use! pathElement = %s" format(pathElement)
params errorHandler onError(InternalError new(token, message))
}
-
- "ooc/%s" format(uze identifier)
+ uze
}
getPath: func (suffix := "") -> String {

0 comments on commit 01067fd

Please sign in to comment.