cd %~dp0
if exist nomotime.exe del nomotime.exe
if exist nomointerpreter.dll del nomointerpreter.dll
cd ../nomointerpreter
if not exist nomointerpreter.dll call build.bat
copy nomointerpreter.dll ..\nomotime
copy nomointerpreter.dll ..\..\src\nomotime
cd ../nomotime

cd ../../src/nomotime

echo Build executable nomotime

gnatmake -Pnomotime.gpr 
del b~nomotime.ads
del b~nomotime.adb
del *.o
del *.ali
del nomointerpreter.dll
mv nomotime.exe ../../build/nomotime
cd ../../build/nomotime