How to specify base dir then we run ant like ant -f somedir/dir/build.xml. Ant sets basedir relative to build.xml, if I specify
ant -f somedir/dir/build.xml.
I found, that using following solution is the easiest.
pushd somedir/dir && ant && popd
Although is seems to be to easy - it works.