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