2 rem ----------------------------------------------------------------------
\r
3 rem Configuration script for MSDOS
\r
4 rem Copyright (C) 1994 Free Software Foundation, Inc.
\r
6 rem This file is part of GNU Emacs.
\r
8 rem GNU Emacs is free software; you can redistribute it and/or modify
\r
9 rem it under the terms of the GNU General Public License as published by
\r
10 rem the Free Software Foundation; either version 2, or (at your option)
\r
11 rem any later version.
\r
13 rem GNU Emacs is distributed in the hope that it will be useful,
\r
14 rem but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 rem GNU General Public License for more details.
\r
18 rem You should have received a copy of the GNU General Public License
\r
19 rem along with GNU Emacs; see the file COPYING. If not, write to
\r
20 rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
21 rem ----------------------------------------------------------------------
\r
22 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
\r
24 rem + msdos version 3 or better.
\r
25 rem + djgpp version 1,11 maint 4 or better.
\r
26 rem + make utility that allows breaking of the 128 chars limit on
\r
27 rem command lines. ndmake (as of version 4.5) won't work due to a
\r
28 rem line length limit.
\r
29 rem + rm, mv, chmod (From GNU file utilities).
\r
32 rem You must install in directory c:/emacs or change this script.
\r
33 rem ----------------------------------------------------------------------
\r
34 if not "%2" == "" goto usage
\r
35 if "%1" == "msdos" goto msdos
\r
36 if "%1" == "msdos-X11" goto msdos11
\r
38 echo Usage: config msdos
\r
39 rem echo or config msdos-X11 -- don't even think about it
\r
40 echo [Read the script before you run it; also check that you have all the
\r
41 echo necessary utilities.]
\r
43 rem ----------------------------------------------------------------------
\r
47 rem ----------------------------------------------------------------------
\r
51 rem Change to the Emacs root -- assume we are there
\r
53 rem ----------------------------------------------------------------------
\r
54 Echo Configuring the source directory...
\r
56 set PATHSH=paths-h.in
\r
57 if exist %PATHSH% goto src1
\r
58 set PATHSH=paths.h-in
\r
59 if exist %PATHSH% goto src1
\r
60 echo config: *** The file originally called "src/paths.h.in" cannot be found.
\r
64 set CONFIGH=config-h.in
\r
65 if exist %CONFIGH% goto src2
\r
66 set CONFIGH=config.h-in
\r
67 if exist %CONFIGH% goto src2
\r
68 echo config: *** The file originally called "src/config.h.in" cannot be found.
\r
72 set MAKEFILEIN=makefile.in-in
\r
73 if exist %MAKEFILEIN% goto src3
\r
74 set MAKEFILEIN=makefile-in.in
\r
75 if exist %MAKEFILEIN% goto src3
\r
76 echo makefile: *** The file originally called "src/makefile.in.in" cannot be found.
\r
81 rem Create "paths.h"
\r
83 sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h
\r
85 rem Create "config.h"
\r
86 rm -f config.h config.tmp
\r
87 cp %CONFIGH% config.tmp
\r
88 if "%X11%" == "" goto src4
\r
89 sed -f ../msdos/sed4.inp <%CONFIGH% >config.tmp
\r
91 sed -f ../msdos/sed2.inp <config.tmp >config.h
\r
94 rem On my system dir.h gets in the way. It's a VMS file so who cares.
\r
95 if exist dir.h ren dir.h vmsdir.h
\r
97 rem Create "makefile" from "makefile.in.in" using a context patch.
\r
98 rm -f makefile junk.c
\r
99 sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c
\r
100 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile
\r
103 rem ----------------------------------------------------------------------
\r
104 Echo Configuring the library source directory...
\r
106 set MAKEFILEIN=makefile.in-in
\r
107 if exist %MAKEFILEIN% goto libsrc1
\r
108 set MAKEFILEIN=makefile-in.in
\r
109 if exist %MAKEFILEIN% goto libsrc1
\r
110 echo makefile: *** The file originally called "lib-src/Makefile.in.in" cannot be found.
\r
114 rem Create "makefile" from "makefile.in".
\r
115 sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c
\r
116 gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[
\f]*$/d" >Makefile.new
\r
117 sed -f ../msdos/sed3.inp <makefile.new >makefile
\r
119 rem ----------------------------------------------------------------------
\r
120 Echo Configuring the main directory...
\r
121 copy msdos\mainmake makefile >nul
\r
122 rem ----------------------------------------------------------------------
\r