1994-07-26 07:47:05 +08:00
|
|
|
@echo off
|
2006-02-12 06:16:04 +08:00
|
|
|
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
2012-01-16 10:29:20 +08:00
|
|
|
rem 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
|
|
|
|
rem Foundation, Inc.
|
2006-02-12 04:00:39 +08:00
|
|
|
rem This file is part of GNU Make.
|
2007-07-05 03:35:15 +08:00
|
|
|
rem
|
2006-02-12 04:00:39 +08:00
|
|
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
|
|
|
rem the terms of the GNU General Public License as published by the Free
|
2007-07-05 03:35:15 +08:00
|
|
|
rem Software Foundation; either version 3 of the License, or (at your option)
|
|
|
|
rem any later version.
|
|
|
|
rem
|
2006-02-12 04:00:39 +08:00
|
|
|
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
2007-07-05 03:35:15 +08:00
|
|
|
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
2006-02-12 04:00:39 +08:00
|
|
|
rem more details.
|
2007-07-05 03:35:15 +08:00
|
|
|
rem
|
2006-02-12 04:00:39 +08:00
|
|
|
rem You should have received a copy of the GNU General Public License along
|
2007-07-05 03:35:15 +08:00
|
|
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
2006-02-12 04:00:39 +08:00
|
|
|
|
1997-04-07 15:21:16 +08:00
|
|
|
echo Configuring MAKE for DJGPP
|
1994-07-26 07:47:05 +08:00
|
|
|
|
1997-08-28 04:30:54 +08:00
|
|
|
rem The SmallEnv trick protects against too small environment block,
|
|
|
|
rem in which case the values will be truncated and the whole thing
|
|
|
|
rem goes awry. COMMAND.COM will say "Out of environment space", but
|
|
|
|
rem many people don't care, so we force them to care by refusing to go.
|
|
|
|
|
|
|
|
rem Where is the srcdir?
|
|
|
|
set XSRC=.
|
|
|
|
if not "%XSRC%"=="." goto SmallEnv
|
|
|
|
if "%1%"=="" goto SrcDone
|
|
|
|
set XSRC=%1
|
|
|
|
if not "%XSRC%"=="%1" goto SmallEnv
|
|
|
|
|
|
|
|
:SrcDone
|
|
|
|
|
|
|
|
update %XSRC%/configh.dos ./config.h
|
1994-07-26 07:47:05 +08:00
|
|
|
|
1997-04-07 15:21:16 +08:00
|
|
|
rem Do they have Make?
|
|
|
|
redir -o junk.$$$ -eo make -n -f NUL
|
|
|
|
rem REDIR will return 1 if it cannot run Make.
|
|
|
|
rem If it can run Make, it will usually return 2,
|
|
|
|
rem but 0 is also OK with us.
|
|
|
|
if errorlevel 2 goto MakeOk
|
|
|
|
if not errorlevel 1 goto MakeOk
|
|
|
|
if exist junk.$$$ del junk.$$$
|
|
|
|
echo No Make program found--use DOSBUILD.BAT to build Make.
|
|
|
|
goto End
|
|
|
|
|
1997-08-28 04:30:54 +08:00
|
|
|
rem They do have Make. Generate the Makefile.
|
1997-04-07 15:21:16 +08:00
|
|
|
|
|
|
|
:MakeOk
|
|
|
|
del junk.$$$
|
1997-08-28 04:30:54 +08:00
|
|
|
update %XSRC%/Makefile.DOS ./Makefile
|
|
|
|
echo Done.
|
|
|
|
if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
|
1997-04-07 15:21:16 +08:00
|
|
|
goto End
|
1994-07-26 07:47:05 +08:00
|
|
|
|
1997-08-28 04:30:54 +08:00
|
|
|
:SmallEnv
|
|
|
|
echo Your environment is too small. Please enlarge it and run me again.
|
|
|
|
|
1997-04-07 15:21:16 +08:00
|
|
|
:End
|
1997-08-28 04:30:54 +08:00
|
|
|
set XRSC=
|