[1993] | 1 | @echo off
|
---|
[3140] | 2 | rem Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
---|
[1993] | 3 | rem This file is part of GNU Make.
|
---|
| 4 | rem
|
---|
| 5 | rem GNU Make is free software; you can redistribute it and/or modify it under
|
---|
| 6 | rem the terms of the GNU General Public License as published by the Free
|
---|
| 7 | rem Software Foundation; either version 3 of the License, or (at your option)
|
---|
| 8 | rem any later version.
|
---|
| 9 | rem
|
---|
| 10 | rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 11 | rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
| 12 | rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
---|
| 13 | rem more details.
|
---|
| 14 | rem
|
---|
| 15 | rem You should have received a copy of the GNU General Public License along
|
---|
| 16 | rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 17 |
|
---|
| 18 | echo Configuring MAKE for DJGPP
|
---|
| 19 |
|
---|
| 20 | rem The SmallEnv trick protects against too small environment block,
|
---|
| 21 | rem in which case the values will be truncated and the whole thing
|
---|
| 22 | rem goes awry. COMMAND.COM will say "Out of environment space", but
|
---|
| 23 | rem many people don't care, so we force them to care by refusing to go.
|
---|
| 24 |
|
---|
| 25 | rem Where is the srcdir?
|
---|
| 26 | set XSRC=.
|
---|
| 27 | if not "%XSRC%"=="." goto SmallEnv
|
---|
| 28 | if "%1%"=="" goto SrcDone
|
---|
| 29 | set XSRC=%1
|
---|
| 30 | if not "%XSRC%"=="%1" goto SmallEnv
|
---|
| 31 |
|
---|
| 32 | :SrcDone
|
---|
| 33 |
|
---|
| 34 | update %XSRC%/configh.dos ./config.h
|
---|
| 35 |
|
---|
| 36 | rem Do they have Make?
|
---|
| 37 | redir -o junk.$$$ -eo make -n -f NUL
|
---|
| 38 | rem REDIR will return 1 if it cannot run Make.
|
---|
| 39 | rem If it can run Make, it will usually return 2,
|
---|
| 40 | rem but 0 is also OK with us.
|
---|
| 41 | if errorlevel 2 goto MakeOk
|
---|
| 42 | if not errorlevel 1 goto MakeOk
|
---|
| 43 | if exist junk.$$$ del junk.$$$
|
---|
| 44 | echo No Make program found--use DOSBUILD.BAT to build Make.
|
---|
| 45 | goto End
|
---|
| 46 |
|
---|
| 47 | rem They do have Make. Generate the Makefile.
|
---|
| 48 |
|
---|
| 49 | :MakeOk
|
---|
| 50 | del junk.$$$
|
---|
| 51 | update %XSRC%/Makefile.DOS ./Makefile
|
---|
| 52 | echo Done.
|
---|
| 53 | if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
|
---|
| 54 | goto End
|
---|
| 55 |
|
---|
| 56 | :SmallEnv
|
---|
| 57 | echo Your environment is too small. Please enlarge it and run me again.
|
---|
| 58 |
|
---|
| 59 | :End
|
---|
| 60 | set XRSC=
|
---|