comparison config.bat @ 12992:09c2ad9213dd

Simplify using new names file names src/makefile.in, config.in, paths.in. Change Echo commands not to use `.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Sep 1995 16:25:34 +0000
parents 9eae919f9a23
children 327ff78701e0
comparison
equal deleted inserted replaced
12991:00db8b604656 12992:09c2ad9213dd
55 set nodebug=Y 55 set nodebug=Y
56 shift 56 shift
57 goto again 57 goto again
58 rem ---------------------------------------------------------------------- 58 rem ----------------------------------------------------------------------
59 :msdos 59 :msdos
60 Echo Checking whether `sed' is available... 60 Echo Checking whether 'sed' is available...
61 Sed -e "w junk.$$$" <Nul 61 sed -e "w junk.$$$" <Nul
62 If Exist junk.$$$ Goto sedOk 62 If Exist junk.$$$ Goto sedOk
63 Echo To configure `Emacs' you need to have `sed'! 63 Echo To configure 'Emacs' you need to have 'sed'!
64 Goto End 64 Goto End
65 :sedOk 65 :sedOk
66 Echo Checking whether `rm' is available... 66 Echo Checking whether 'rm' is available...
67 rm -f junk.$$$ 67 rm -f junk.$$$
68 If Not Exist junk.$$$ Goto rmOk 68 If Not Exist junk.$$$ Goto rmOk
69 Echo To configure `Emacs' you need to have `rm'! 69 Echo To configure 'Emacs' you need to have 'rm'!
70 Goto End 70 Goto End
71 :rmOk 71 :rmOk
72 Echo Checking whether `mv' is available... 72 Echo Checking whether 'mv' is available...
73 rm -f junk.1 junk.2 73 rm -f junk.1 junk.2
74 echo foo >junk.1 74 echo foo >junk.1
75 mv junk.1 junk.2 75 mv junk.1 junk.2
76 If Exist junk.2 Goto mvOk 76 If Exist junk.2 Goto mvOk
77 Echo To configure `Emacs' you need to have `mv'! 77 Echo To configure 'Emacs' you need to have 'mv'!
78 rm -f junk.1 78 rm -f junk.1
79 Goto End 79 Goto End
80 :mvOk 80 :mvOk
81 rm -f junk.2 81 rm -f junk.2
82 Echo Checking whether `gcc' is available... 82 Echo Checking whether 'gcc' is available...
83 echo main(){} >junk.c 83 echo main(){} >junk.c
84 gcc -c junk.c 84 gcc -c junk.c
85 if exist junk.o goto gccOk 85 if exist junk.o goto gccOk
86 Echo To configure `Emacs' you need to have `gcc'! 86 Echo To configure 'Emacs' you need to have 'gcc'!
87 rm -f junk.c 87 rm -f junk.c
88 Goto End 88 Goto End
89 :gccOk 89 :gccOk
90 rm -f junk.c junk.o 90 rm -f junk.c junk.o
91 Rem ---------------------------------------------------------------------- 91 Rem ----------------------------------------------------------------------
92 Echo Configuring the source directory... 92 Echo Configuring the source directory...
93 cd src 93 cd src
94 set PATHSH=paths-h.in
95 if exist %PATHSH% goto src1
96 set PATHSH=paths.h-in
97 if exist %PATHSH% goto src1
98 echo config: *** The file originally called "src/paths.h.in" cannot be found.
99 cd ..
100 goto end
101 :src1
102 set CONFIGH=config-h.in
103 if exist %CONFIGH% goto src2
104 set CONFIGH=config.h-in
105 if exist %CONFIGH% goto src2
106 echo config: *** The file originally called "src/config.h.in" cannot be found.
107 cd ..
108 goto end
109 :src2
110 set MAKEFILEIN=makefile.in-in
111 if exist %MAKEFILEIN% goto src3
112 set MAKEFILEIN=makefile-in.in
113 if exist %MAKEFILEIN% goto src3
114 echo makefile: *** The file originally called "src/makefile.in.in" cannot be found.
115 cd ..
116 goto end
117 :src3
118 94
119 rem Create "paths.h" 95 rem Create "paths.h"
120 sed -f ../msdos/sed4.inp <%PATHSH% >paths.tmp 96 sed -f ../msdos/sed4.inp <paths.in >paths.tmp
121 update paths.tmp paths.h >nul 97 update paths.tmp paths.h >nul
122 rm -f paths.tmp 98 rm -f paths.tmp
123 99
124 rem Create "config.h" 100 rem Create "config.h"
125 rm -f config.h2 config.tmp 101 rm -f config.h2 config.tmp
126 cp %CONFIGH% config.tmp 102 cp config.in config.tmp
127 if "%X11%" == "" goto src4 103 if "%X11%" == "" goto src4
128 sed -f ../msdos/sed2x.inp <%CONFIGH% >config.tmp 104 sed -f ../msdos/sed2x.inp <config.in >config.tmp
129 :src4 105 :src4
130 sed -f ../msdos/sed2.inp <config.tmp >config.h2 106 sed -f ../msdos/sed2.inp <config.tmp >config.h2
131 update config.h2 config.h >nul 107 update config.h2 config.h >nul
132 rm -f config.tmp config.h2 108 rm -f config.tmp config.h2
133 109
134 rem On my system dir.h gets in the way. It's a VMS file so who cares. 110 rem On my system dir.h gets in the way. It's a VMS file so who cares.
135 if exist dir.h ren dir.h vmsdir.h 111 if exist dir.h ren dir.h vmsdir.h
136 112
137 rem Create "makefile" from "makefile.in.in". 113 rem Create "makefile" from "makefile.in".
138 rm -f makefile junk.c 114 rm -f makefile junk.c
139 sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c 115 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c
140 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile 116 gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile
141 rm -f junk.c 117 rm -f junk.c
118
142 if "%X11%" == "" goto src5 119 if "%X11%" == "" goto src5
143 mv makefile makefile.tmp 120 mv makefile makefile.tmp
144 sed -f ../msdos/sed1x.inp <makefile.tmp >makefile 121 sed -f ../msdos/sed1x.inp <makefile.tmp >makefile
145 rm -f makefile.tmp 122 rm -f makefile.tmp
146 :src5 123 :src5
151 :src6 128 :src6
152 cd .. 129 cd ..
153 rem ---------------------------------------------------------------------- 130 rem ----------------------------------------------------------------------
154 Echo Configuring the library source directory... 131 Echo Configuring the library source directory...
155 cd lib-src 132 cd lib-src
156 set MAKEFILEIN=makefile.in-in
157 if exist %MAKEFILEIN% goto libsrc1
158 set MAKEFILEIN=makefile-in.in
159 if exist %MAKEFILEIN% goto libsrc1
160 echo makefile: *** The file originally called "lib-src/Makefile.in.in" cannot be found.
161 cd ..
162 goto end
163 :libsrc1
164 rem Create "makefile" from "makefile.in". 133 rem Create "makefile" from "makefile.in".
165 sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c 134 sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c
166 gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >Makefile.new 135 gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new
167 sed -f ../msdos/sed3.inp <makefile.new >makefile 136 sed -f ../msdos/sed3.inp <makefile.new >makefile
168 rm -f makefile.new junk.c 137 rm -f makefile.new junk.c
169 if "%nodebug%" == "" goto libsrc2 138 if "%nodebug%" == "" goto libsrc2
170 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp 139 sed -e "/^CFLAGS *=/s/ *-g//" <makefile >makefile.tmp
171 mv -f makefile.tmp makefile 140 mv -f makefile.tmp makefile
187 copy msdos\mainmake makefile >nul 156 copy msdos\mainmake makefile >nul
188 rem ---------------------------------------------------------------------- 157 rem ----------------------------------------------------------------------
189 :end 158 :end
190 set X11= 159 set X11=
191 set nodebug= 160 set nodebug=
192 set MAKEFILEIN=
193 set PATHSH=
194 set CONFIGH=