@echo off\r
rem ----------------------------------------------------------------------\r
rem Configuration script for MSDOS\r
+rem Copyright (C) 1994 Free Software Foundation, Inc.\r
+\r
rem This file is part of GNU Emacs.\r
\r
rem GNU Emacs is free software; you can redistribute it and/or modify\r
rem ----------------------------------------------------------------------\r
rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
rem\r
-rem + djgpp version 1,11\r
-rem + make utility that allows breaking of 128 chars limit of commands.\r
-rem ndmake (as of version 4.5) won't work due to a line length limit.\r
+rem + msdos version 3 or better.\r
+rem + djgpp version 1,11 maint 4 or better.\r
+rem + make utility that allows breaking of the 128 chars limit on\r
+rem command lines. ndmake (as of version 4.5) won't work due to a\r
+rem line length limit.\r
rem + rm, mv, chmod (From GNU file utilities).\r
rem + sed.\r
+rem\r
+rem You must install in directory c:/emacs or change this script.\r
rem ----------------------------------------------------------------------\r
if not "%2" == "" goto usage\r
if "%1" == "msdos" goto msdos\r
+if "%1" == "msdos-X11" goto msdos11\r
:usage\r
echo Usage: config msdos\r
+rem echo or config msdos-X11 -- don't even think about it\r
echo [Read the script before you run it; also check that you have all the\r
echo necessary utilities.]\r
goto end\r
rem ----------------------------------------------------------------------\r
+:msdos11\r
+set X11=y\r
+goto msdoscommon\r
+rem ----------------------------------------------------------------------\r
:msdos\r
-rem Change to the Emacs root\r
-cd c:\emacs\r
+set X11=\r
+:msdoscommon\r
+rem Change to the Emacs root -- assume we are there\r
+rem cd c:\emacs\r
rem ----------------------------------------------------------------------\r
Echo Configuring the source directory...\r
cd src\r
sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h\r
\r
rem Create "config.h"\r
-rm -f config.h\r
-sed -f ../msdos/sed2.inp <%CONFIGH% >config.h\r
+rm -f config.h config.tmp\r
+cp %CONFIGH% config.tmp\r
+if "%X11%" == "" goto src4\r
+sed -f ../msdos/sed4.inp <%CONFIGH% >config.tmp\r
+:src4\r
+sed -f ../msdos/sed2.inp <config.tmp >config.h\r
+rm -f config.tmp\r
\r
rem On my system dir.h gets in the way. It's a VMS file so who cares.\r
if exist dir.h ren dir.h vmsdir.h\r
Echo Configuring the library source directory...\r
cd lib-src\r
rem Create "makefile" from "makefile.in".\r
-copy makefile makefile.bak >nul\r
-sed -f ../msdos/sed3.inp <makefile.in >makefile\r
+sed -e "s@^# \(Generated.*\)$@/* \1 */@" -e "s@/\*\*/#\(.*\)$@/* \1 */@" <Makefile.in >junk.c\r
+gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ \f]*$/d" >Makefile.new\r
+sed -f ../msdos/sed3.inp <makefile.new >makefile\r
cd ..\r
rem ----------------------------------------------------------------------\r
Echo Configuring the main directory...\r
copy msdos\mainmake makefile >nul\r
rem ----------------------------------------------------------------------\r
:end\r
+set X11=\r
+set MAKEFILEIN=\r
+set PATHSH=\r
+set CONFIGH=\r
+