2 echo Configuring MAKE for DJGPP
\r
4 rem The SmallEnv trick protects against too small environment block,
\r
5 rem in which case the values will be truncated and the whole thing
\r
6 rem goes awry. COMMAND.COM will say "Out of environment space", but
\r
7 rem many people don't care, so we force them to care by refusing to go.
\r
9 rem Where is the srcdir?
\r
11 if not "%XSRC%"=="." goto SmallEnv
\r
12 if "%1%"=="" goto SrcDone
\r
14 if not "%XSRC%"=="%1" goto SmallEnv
\r
18 update %XSRC%/configh.dos ./config.h
\r
20 rem Do they have Make?
\r
21 redir -o junk.$$$ -eo make -n -f NUL
\r
22 rem REDIR will return 1 if it cannot run Make.
\r
23 rem If it can run Make, it will usually return 2,
\r
24 rem but 0 is also OK with us.
\r
25 if errorlevel 2 goto MakeOk
\r
26 if not errorlevel 1 goto MakeOk
\r
27 if exist junk.$$$ del junk.$$$
\r
28 echo No Make program found--use DOSBUILD.BAT to build Make.
\r
31 rem They do have Make. Generate the Makefile.
\r
35 update %XSRC%/Makefile.DOS ./Makefile
\r
37 if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
\r
41 echo Your environment is too small. Please enlarge it and run me again.
\r