| 1 | @echo off\r |
| 2 | rem ----------------------------------------------------------------------\r |
| 3 | rem Configuration script for MSDOS\r |
| 4 | rem Copyright (C) 1994 Free Software Foundation, Inc.\r |
| 5 | \r |
| 6 | rem This file is part of GNU Emacs.\r |
| 7 | \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 |
| 12 | \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 |
| 17 | \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 |
| 23 | rem\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 |
| 30 | rem + sed.\r |
| 31 | rem\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 |
| 37 | :usage\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 |
| 42 | goto end\r |
| 43 | rem ----------------------------------------------------------------------\r |
| 44 | :msdos11\r |
| 45 | set X11=y\r |
| 46 | goto msdoscommon\r |
| 47 | rem ----------------------------------------------------------------------\r |
| 48 | :msdos\r |
| 49 | set X11=\r |
| 50 | :msdoscommon\r |
| 51 | rem Change to the Emacs root -- assume we are there\r |
| 52 | rem cd c:\emacs\r |
| 53 | rem ----------------------------------------------------------------------\r |
| 54 | Echo Configuring the source directory...\r |
| 55 | cd src\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 |
| 61 | cd ..\r |
| 62 | goto end\r |
| 63 | :src1\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 |
| 69 | cd ..\r |
| 70 | goto end\r |
| 71 | :src2\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 |
| 77 | cd ..\r |
| 78 | goto end\r |
| 79 | :src3\r |
| 80 | \r |
| 81 | rem Create "paths.h"\r |
| 82 | rm -f paths.h\r |
| 83 | sed -e "s!/lib/emacs!!" -e "s!/usr/local!c:/emacs!" -e "s!/data!/etc!" <%PATHSH% >paths.h\r |
| 84 | \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 |
| 90 | :src4\r |
| 91 | sed -f ../msdos/sed2.inp <config.tmp >config.h\r |
| 92 | rm -f config.tmp\r |
| 93 | \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 |
| 96 | \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 |
| 101 | rm -f junk.c\r |
| 102 | cd ..\r |
| 103 | rem ----------------------------------------------------------------------\r |
| 104 | Echo Configuring the library source directory...\r |
| 105 | cd lib-src\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 |
| 111 | cd ..\r |
| 112 | goto end\r |
| 113 | :libsrc1\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 |
| 118 | cd ..\r |
| 119 | rem ----------------------------------------------------------------------\r |
| 120 | Echo Configuring the main directory...\r |
| 121 | copy msdos\mainmake makefile >nul\r |
| 122 | rem ----------------------------------------------------------------------\r |
| 123 | :end\r |
| 124 | set X11=\r |
| 125 | set MAKEFILEIN=\r |
| 126 | set PATHSH=\r |
| 127 | set CONFIGH=\r |
| 128 | \r |