@echo off
echo Configuring OpenSSL 1.0.2u for DJGPP v2.5...

Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
Rem format, or else stock DOS/Windows shells will refuse to run it.

cd ..
set TMPDIR=.
Rem If no entropy source is avalible during building
Rem then a noise file is required.
set RANDFILE=%RANDFILE%

touch _conf_start.txt
redir -eo sh ./Configure 386 no-threads --prefix=/dev/env/DJDIR DJGPP > 1.txt
Rem zlib stuerzt ab!!!  Nicht klar warum.
Rem Stuerzt mit 1.0.2s nicht mehr ab aber die testsuite laeuft nicht durch.
:redir -eo sh ./Configure 386 zlib no-threads --prefix=/dev/env/DJDIR DJGPP > 1.txt
touch _conf_stop.txt
@echo Finished with configuring ...
touch _make_depend_start.txt
redir -eo make depend > 2.txt
touch _make_depend_stop.txt
@echo Finished with generating the dependencies ...

touch _make_start.txt
redir -eo make > 3.txt
touch _make_stop.txt
@echo Finished with building ...

touch _test_start.txt
redir -eo make  test > 4.txt
touch _test_stop.txt
@echo Finished with checking ...

touch _inst_start.txt
if "%INSTALL_DIR%" == "" goto DefaultInstall
Rem Full install
::redir -eo make install_html_docs INSTALLTOP=%INSTALL_DIR% > 5.txt
redir -eo make install INSTALLTOP=%INSTALL_DIR% > 5.txt
:redir -eo make -n install INSTALLTOP=%INSTALL_DIR% > 5.txt
Rem bins only install
:redir -eo make install_sw INSTALLTOP=%INSTALL_DIR% > 5.txt
goto End
:DefaultInstall
Rem Full install
::redir -eo make install_html_docs > 5.txt
redir -eo make install > 5.txt
:redir -eo make -n install > 5.txt
Rem bins only install
:redir -eo make install_sw > 5.txt
:End
touch _inst_stop.txt
@echo Finished with installing ...
