It's not exactly easy for me to summarize this... I have this structure on disk:
[dir] project
- [dir] foo
- [file] foo.build
- [dir] bar
- [file] bar.build
- [file] default.include
The file default.include contains a couple of properties which are the directories used during the build. E.g: property name="build.dir" value="${directory::get-current-directory}".
The default.include file is included by foo.build and bar.build using its relative path: include buildfile="..\default.include"
Now the problem: when I run foo.build from project\foo dir, I get the wrong value for build.dir. I need "project" and I get "project\foo" instead. Is there a way to get the directory in which the .include file exists?
I could do this in a batch file using %~dp0