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