diff --git a/compiler/compile.cmd b/compiler/compile.cmd index ab08a4165..efb49cd55 100644 --- a/compiler/compile.cmd +++ b/compiler/compile.cmd @@ -1,4 +1,4 @@ -set PROG8_LIBDIR=../prog8lib +rem set PROG8_LIBDIR=../prog8lib set PROG8CLASSPATH=out/production/compiler/ set KOTLINPATH=%USERPROFILE%/.IdeaIC2018.3/config/plugins/Kotlin set LIBJARS=%KOTLINPATH%/lib/kotlin-stdlib.jar;%KOTLINPATH%/lib/kotlin-reflect.jar;antlr/lib/antlr-runtime-4.7.2.jar diff --git a/compiler/compile.sh b/compiler/compile.sh index 25c57615f..7ae65eac0 100755 --- a/compiler/compile.sh +++ b/compiler/compile.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -PROG8_LIBDIR=../prog8lib +# PROG8_LIBDIR=../prog8lib PROG8CLASSPATH=out/production/compiler KOTLINPATH=${HOME}/.IntelliJIdea2018.3/config/plugins/Kotlin LIBJARS=${KOTLINPATH}/lib/kotlin-stdlib.jar:${KOTLINPATH}/lib/kotlin-reflect.jar:antlr/lib/antlr-runtime-4.7.2.jar diff --git a/prog8lib/c64flt.p8 b/compiler/prog8lib/c64flt.p8 similarity index 100% rename from prog8lib/c64flt.p8 rename to compiler/prog8lib/c64flt.p8 diff --git a/prog8lib/c64lib.p8 b/compiler/prog8lib/c64lib.p8 similarity index 100% rename from prog8lib/c64lib.p8 rename to compiler/prog8lib/c64lib.p8 diff --git a/prog8lib/c64utils.p8 b/compiler/prog8lib/c64utils.p8 similarity index 100% rename from prog8lib/c64utils.p8 rename to compiler/prog8lib/c64utils.p8 diff --git a/prog8lib/prog8lib.p8 b/compiler/prog8lib/prog8lib.p8 similarity index 100% rename from prog8lib/prog8lib.p8 rename to compiler/prog8lib/prog8lib.p8 diff --git a/compiler/src/prog8/parser/ModuleParsing.kt b/compiler/src/prog8/parser/ModuleParsing.kt index e819140b7..a1c0119cc 100644 --- a/compiler/src/prog8/parser/ModuleParsing.kt +++ b/compiler/src/prog8/parser/ModuleParsing.kt @@ -23,8 +23,13 @@ private class LexerErrorListener: BaseErrorListener() { fun importModule(filePath: Path) : Module { print("importing '${filePath.fileName}'") - if(filePath.parent!=null) - println(" (from '${filePath.parent}')") + if(filePath.parent!=null) { + var importloc = filePath.toString() + val curdir = Paths.get("").toAbsolutePath().toString() + if(importloc.startsWith(curdir)) + importloc = "." + importloc.substring(curdir.length) + println(" (from '$importloc')") + } else println("") if(!Files.isReadable(filePath))