mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-20 03:16:45 +00:00
Fix #106: the current working directory should be always included in the include path
This commit is contained in:
@@ -11,7 +11,8 @@ Each module has a name, which is its unique identifier.
|
||||
A module name is a sequence of slash-separated valid Millfork identifiers.
|
||||
The name also defines where the module is located:
|
||||
a module named `a/b` is presumed to exist in `a/b.mfk`
|
||||
and it's looked up first in the current working directory,
|
||||
and it's looked up first in the directory that contains the current source file,
|
||||
then in the current working directory,
|
||||
and then in the include directories.
|
||||
|
||||
A module can import other modules, using the `import` statement.
|
||||
|
||||
@@ -241,10 +241,10 @@ object Main {
|
||||
log.debug(s"Failed to find the default include path: $err")
|
||||
case Right(path) =>
|
||||
log.debug(s"Automatically detected include path: $path")
|
||||
return c.copy(includePath = List(path) ++ c.extraIncludePath)
|
||||
return c.copy(includePath = List(System.getProperty("user.dir"), path) ++ c.extraIncludePath)
|
||||
}
|
||||
}
|
||||
c.copy(includePath = c.includePath ++ c.extraIncludePath)
|
||||
c.copy(includePath = System.getProperty("user.dir") :: (c.includePath ++ c.extraIncludePath))
|
||||
}
|
||||
|
||||
private def assembleForMos(c: Context, platform: Platform, options: CompilationOptions): AssemblerOutput = {
|
||||
|
||||
Reference in New Issue
Block a user