Commit | Line | Data |
---|---|---|
3382cd59 RS |
1 | @echo off\r |
2 | rem ----------------------------------------------------------------------\r | |
3 | rem Configuration script for MSDOS\r | |
4 | rem This file is part of GNU Emacs.\r | |
5 | \r | |
6 | rem GNU Emacs is free software; you can redistribute it and/or modify\r | |
7 | rem it under the terms of the GNU General Public License as published by\r | |
8 | rem the Free Software Foundation; either version 2, or (at your option)\r | |
9 | rem any later version.\r | |
10 | \r | |
11 | rem GNU Emacs is distributed in the hope that it will be useful,\r | |
12 | rem but WITHOUT ANY WARRANTY; without even the implied warranty of\r | |
13 | rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r | |
14 | rem GNU General Public License for more details.\r | |
15 | \r | |
16 | rem You should have received a copy of the GNU General Public License\r | |
17 | rem along with GNU Emacs; see the file COPYING. If not, write to\r | |
18 | rem the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\r | |
19 | rem ----------------------------------------------------------------------\r | |
20 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r | |
21 | rem\r | |
22 | rem + djgpp.\r | |
23 | rem + make utility that allows breaking of 128 chars limit of commands.\r | |
24 | rem ndmake (as of version 4.5) won't work due to a line length limit.\r | |
25 | rem + rm, mv, chmod (From GNU file utilities).\r | |
26 | rem + sed.\r | |
27 | rem + patch (Larry Wall's for instance. I think it's supplied with djgpp).\r | |
28 | rem ----------------------------------------------------------------------\r | |
29 | if not "%2" == "" goto usage\r | |
30 | if "%1" == "msdos" goto msdos\r | |
31 | :usage\r | |
32 | echo Usage: config msdos\r | |
33 | echo [Read the script before you run it; also check that you have all the\r | |
34 | echo necessary utilities.]\r | |
35 | goto end\r | |
36 | rem ----------------------------------------------------------------------\r | |
37 | :msdos\r | |
38 | rem Change to the Emacs root\r | |
39 | cd c:\emacs\r | |
40 | rem ----------------------------------------------------------------------\r | |
41 | Echo Configuring the source directory...\r | |
42 | cd src\r | |
43 | set PATHSH=paths-h.in\r | |
44 | if exist %PATHSH% goto src1\r | |
45 | set PATHSH=paths.h-in\r | |
46 | if exist %PATHSH% goto src1\r | |
47 | echo config: *** The file originally called "src/paths.h.in" cannot be found.\r | |
48 | cd ..\r | |
49 | goto end\r | |
50 | :src1\r | |
51 | set CONFIGH=config-h.in\r | |
52 | if exist %CONFIGH% goto src2\r | |
53 | set CONFIGH=config.h-in\r | |
54 | if exist %CONFIGH% goto src2\r | |
55 | echo config: *** The file originally called "src/config.h.in" cannot be found.\r | |
56 | cd ..\r | |
57 | goto end\r | |
58 | :src2\r | |
59 | set MAKEFILEIN=makefile.in-in\r | |
60 | if exist %MAKEFILEIN% goto src3\r | |
61 | set MAKEFILEIN=makefile-in.in\r | |
62 | if exist %MAKEFILEIN% goto src3\r | |
63 | echo makefile: *** The file originally called "src/makefile.in.in" cannot be found.\r | |
64 | cd ..\r | |
65 | goto end\r | |
66 | :src3\r | |
67 | \r | |
68 | rem Create "paths.h"\r | |
69 | rm -f paths.h\r | |
70 | sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h\r | |
71 | \r | |
72 | rem Create "config.h"\r | |
73 | rm -f config.h\r | |
74 | sed -f ../msdos/sed2.inp <%CONFIGH% >config.h\r | |
75 | \r | |
76 | rem On my system dir.h gets in the way. It's a VMS file so who cares.\r | |
77 | if exist dir.h ren dir.h vmsdir.h\r | |
78 | \r | |
79 | rem Create "makefile" from "makefile.in.in" using a context patch.\r | |
80 | rm -f makefile\r | |
81 | cp %MAKEFILEIN% makefile\r | |
82 | patch -p1 -B ! -r patch.rjt makefile ../msdos/patch1\r | |
83 | echo All hunks above should have passed! If they didn't, you'll have to\r | |
84 | echo update manually. That should be easy though.\r | |
85 | mv makefile junk.c\r | |
86 | gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile\r | |
87 | del !makefile\r | |
88 | del junk.c\r | |
89 | cd ..\r | |
90 | rem ----------------------------------------------------------------------\r | |
91 | Echo Configuring the library source directory...\r | |
92 | cd lib-src\r | |
93 | rem Create "makefile" from "makefile.in".\r | |
94 | copy makefile makefile.bak >nul\r | |
95 | sed -f ../msdos/sed3.inp <makefile.in >makefile\r | |
96 | cd ..\r | |
97 | rem ----------------------------------------------------------------------\r | |
98 | Echo Configuring the main directory...\r | |
99 | copy msdos\mainmake makefile >nul\r | |
100 | rem ----------------------------------------------------------------------\r | |
101 | :end\r |