Update Janus/Ada build scripts for src directory.

As sources moved to src directory, adjust Janus/Ada
scripts for the new location. Also, simplify
the scripts a little.
4 files changed, 56 insertions(+), 32 deletions(-)

M janusada/build.bat
R janusada/compile.bat => 
M janusada/prepare.bat
R janusada/update.bat => 
M janusada/build.bat +35 -4
@@ 1,4 1,35 @@ 
-call update.bat
-if ErrorLevel 2 goto abort
-call compile.bat
-:abort
  No newline at end of file
+setlocal
+
+set JBIND_OPTIONS=/t/l/YLLIBCMT/q
+set COMP_OPTIONS=/q/b
+set TOPDIR=%CD%
+set SUFFIX=/l'ads'/n'adb'
+
+if not exist lib\sqlite3.lib (
+  echo ERROR: Copy sqlite3.lib to lib\ directory before building.
+  exit /b 1
+)
+
+cd src
+corder sqlite3_libmain /e/psqlite3%SUFFIX%/t/w/k255/js'jbind'/jb'%JBIND_OPTIONS%'/c'%COMP_OPTIONS%'/b'..\obj\ctst.bat'/r..\obj
+
+if %ERRORLEVEL NEQ 0 goto errorhappened
+cd ..
+
+call obj\ctst.bat
+
+if %ERRORLEVEL NEQ 0 goto errorhappened
+
+cd obj
+link  -subsystem:console -entry:mainCRTStartup -out:sqlite3_libmain.exe sqlite3_.obj ..\lib\sqlite3.lib libcmt.lib kernel32.lib bcrypt.lib -map:sqlite3_libmain.map
+
+if %ERRORLEVEL NEQ 0 goto errorhappened
+
+:allok:
+cd %TOPDIR%
+exit /b 0
+
+:errorhappened:
+cd %TOPDIR%
+exit /b 1
+

          
R janusada/compile.bat =>  +0 -8
@@ 1,8 0,0 @@ 
-call ctst.bat
-cd obj
-link  -subsystem:console -entry:mainCRTStartup -out:..\testsql.exe testsql.obj libcmt.lib kernel32.lib user32.lib ..\lib\sqlite3.lib -nodefaultlib:libc.lib -map:testsql.map
-cd ..\test
-call ctst.bat
-cd ..\testobj
-link  -subsystem:console -entry:mainCRTStartup -out:..\tester.exe tester.obj libcmt.lib kernel32.lib user32.lib ..\lib\sqlite3.lib -nodefaultlib:libc.lib -map:tester.map
-cd ..
  No newline at end of file

          
M janusada/prepare.bat +21 -15
@@ 1,16 1,22 @@ 
-set januspath=C:\Jnt312bw\rts\console
-del /q obj\*.*
-rem del /q lib\*.*
+setlocal
+if [%JAWSII%] == [] (
+  set januspath=C:\JanusAda\rts\console
+) else (
+  if exist %JAWSII% (
+    if %JAWSII:~-1[,1]% == \ (
+      set januspath=%JAWSII%rts\console
+    ) else (
+      set januspath=%JAWSII%\rts\console
+    )
+  ) else (
+    set januspath=C:\JanusAda\rts\console
+  )
+)
+
+@echo JANUSPATH: %januspath%
+
+if exist obj rmdir /q /s obj
 mkdir obj
-rem mkdir lib
-jmanager Add_Project (obj\,Sqlite)
-jmanager Add_Link (obj\,Sqlite,%januspath%, JNT_RTS_CONSOLE)
-mkdir testobj
-jmanager Add_Project (testobj\,Sqlitetst)
-jmanager Add_Link (testobj\,Sqlitetst,%januspath%, JNT_RTS_CONSOLE)
-jmanager Add_Link (testobj\,Sqlitetst,obj, Sqlite)
-jmanager Add_Link (testobj\,Sqlitetst,c:\work\ahven\lib_obj, Ahvenlib)
-cd lib
-rem copy ..\sqlite3.def .
-rem lib /machine:x86 /def:sqlite3.def
-cd ..
+
+jmanager Add_Project(obj,sqlite3)
+jmanager Add_Link(obj,sqlite3,%januspath%, JWIN_RTS_CONSOLE)

          
R janusada/update.bat =>  +0 -5
@@ 1,5 0,0 @@ 
-corder testsql /pSqlite/l'ads'/n'adb'/c'/X'/t/w/k255/js'jbind'/jb'/t/l/YLLIBCMT'/b'ctst.bat'/robj
-cd test
- corder tester /pSqlitetst/l'ads'/n'adb'/c'/X'/t/w/k255/js'jbind'/jb'/t/l/YLLIBCMT'/b'ctst.bat'/r..\testobj
-cd ..
-