* New config.sub and config.guess
[make.git] / configure.bat
bloba357923967090eae76dba25394b6d4bbfff4dd5d
1 @echo off\r
2 echo Configuring MAKE for DJGPP\r
3 \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
8 \r
9 rem Where is the srcdir?\r
10 set XSRC=.\r
11 if not "%XSRC%"=="." goto SmallEnv\r
12 if "%1%"=="" goto SrcDone\r
13 set XSRC=%1\r
14 if not "%XSRC%"=="%1" goto SmallEnv\r
16 :SrcDone\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
29 goto End\r
31 rem They do have Make.  Generate the Makefile.\r
33 :MakeOk\r
34 del junk.$$$\r
35 update %XSRC%/Makefile.DOS ./Makefile\r
36 echo Done.\r
37 if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"\r
38 goto End\r
40 :SmallEnv\r
41 echo Your environment is too small.  Please enlarge it and run me again.\r
43 :End\r
44 set XRSC=\r