2 rem ----------------------------------------------------------------------
3 rem Configuration script for MSDOS
4 rem This file is part of GNU Emacs.
6 rem GNU Emacs is free software; you can redistribute it and/or modify
7 rem it under the terms of the GNU General Public License as published by
8 rem the Free Software Foundation; either version 2, or (at your option)
11 rem GNU Emacs is distributed in the hope that it will be useful,
12 rem but WITHOUT ANY WARRANTY; without even the implied warranty of
13 rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 rem GNU General Public License for more details.
16 rem You should have received a copy of the GNU General Public License
17 rem along with GNU Emacs; see the file COPYING. If not, write to
18 rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 rem ----------------------------------------------------------------------
20 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
22 rem + djgpp version 1,11
23 rem + make utility that allows breaking of 128 chars limit of commands.
24 rem ndmake (as of version 4.5) won't work due to a line length limit.
25 rem + rm, mv, chmod (From GNU file utilities).
27 rem ----------------------------------------------------------------------
28 if not "%2" == "" goto usage
29 if "%1" == "msdos" goto msdos
31 echo Usage
: config msdos
32 echo [Read the script before you
run it
; also check that you have all the
33 echo necessary utilities.
]
35 rem ----------------------------------------------------------------------
37 rem Change to the Emacs root
39 rem ----------------------------------------------------------------------
40 Echo Configuring the source directory...
43 if exist %PATHSH% goto src1
45 if exist %PATHSH% goto src1
46 echo config
: *** The file originally called
"src/paths.h.in" cannot be found.
50 set CONFIGH
=config
-h.in
51 if exist %CONFIGH% goto src2
52 set CONFIGH
=config.h
-in
53 if exist %CONFIGH% goto src2
54 echo config
: *** The file originally called
"src/config.h.in" cannot be found.
58 set MAKEFILEIN
=makefile.in
-in
59 if exist %MAKEFILEIN% goto src3
60 set MAKEFILEIN
=makefile
-in.in
61 if exist %MAKEFILEIN% goto src3
62 echo makefile
: *** The file originally called
"src/makefile.in.in" cannot be found.
69 sed
-e
"s!/lib/emacs!!" -e
"s!/usr/local!c:/emacs!" -e
"s!/data!/etc!" <%PATHSH% >paths.h
73 sed
-f ..
/msdos
/sed2.inp
<%CONFIGH% >config.h
75 rem On my system dir.h gets in the way. It's a VMS file so who cares.
76 if exist dir.h
ren dir.h vmsdir.h
78 rem Create "makefile" from "makefile.in.in" using a context patch.
80 cp
%MAKEFILEIN% junk.c
81 gcc
-E junk.c | sed
-f ..
/msdos
/sed1.inp
>makefile
84 rem ----------------------------------------------------------------------
85 Echo Configuring the library source directory...
87 rem Create "makefile" from "makefile.in".
88 copy makefile makefile.bak
>nul
89 sed
-f ..
/msdos
/sed3.inp
<makefile.in
>makefile
91 rem ----------------------------------------------------------------------
92 Echo Configuring the main directory...
93 copy msdos\mainmake makefile
>nul
94 rem ----------------------------------------------------------------------