Commit 2f3e7987 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Simplify using new names file names src/makefile.in,

config.in, paths.in.  Change Echo commands not to use `.
parent c9684936
...@@ -57,33 +57,33 @@ shift ...@@ -57,33 +57,33 @@ shift
goto again goto again
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
:msdos :msdos
Echo Checking whether `sed' is available... Echo Checking whether 'sed' is available...
Sed -e "w junk.$$$" <Nul sed -e "w junk.$$$" <Nul
If Exist junk.$$$ Goto sedOk If Exist junk.$$$ Goto sedOk
Echo To configure `Emacs' you need to have `sed'! Echo To configure 'Emacs' you need to have 'sed'!
Goto End Goto End
:sedOk :sedOk
Echo Checking whether `rm' is available... Echo Checking whether 'rm' is available...
rm -f junk.$$$ rm -f junk.$$$
If Not Exist junk.$$$ Goto rmOk If Not Exist junk.$$$ Goto rmOk
Echo To configure `Emacs' you need to have `rm'! Echo To configure 'Emacs' you need to have 'rm'!
Goto End Goto End
:rmOk :rmOk
Echo Checking whether `mv' is available... Echo Checking whether 'mv' is available...
rm -f junk.1 junk.2 rm -f junk.1 junk.2
echo foo >junk.1 echo foo >junk.1
mv junk.1 junk.2 mv junk.1 junk.2
If Exist junk.2 Goto mvOk If Exist junk.2 Goto mvOk
Echo To configure `Emacs' you need to have `mv'! Echo To configure 'Emacs' you need to have 'mv'!
rm -f junk.1 rm -f junk.1
Goto End Goto End
:mvOk :mvOk
rm -f junk.2 rm -f junk.2
Echo Checking whether `gcc' is available... Echo Checking whether 'gcc' is available...
echo main(){} >junk.c echo main(){} >junk.c
gcc -c junk.c gcc -c junk.c
if exist junk.o goto gccOk if exist junk.o goto gccOk
Echo To configure `Emacs' you need to have `gcc'! Echo To configure 'Emacs' you need to have 'gcc'!
rm -f junk.c rm -f junk.c
Goto End Goto End
:gccOk :gccOk
...@@ -91,41 +91,17 @@ rm -f junk.c junk.o ...@@ -91,41 +91,17 @@ rm -f junk.c junk.o
Rem ---------------------------------------------------------------------- Rem ----------------------------------------------------------------------
Echo Configuring the source directory... Echo Configuring the source directory...
cd src cd src
set PATHSH=paths-h.in
if exist %PATHSH% goto src1
set PATHSH=paths.h-in
if exist %PATHSH% goto src1
echo config: *** The file originally called "src/paths.h.in" cannot be found.
cd ..
goto end
:src1
set CONFIGH=config-h.in
if exist %CONFIGH% goto src2
set CONFIGH=config.h-in
if exist %CONFIGH% goto src2
echo config: *** The file originally called "src/config.h.in" cannot be found.
cd ..
goto end
:src2
set MAKEFILEIN=makefile.in-in
if exist %MAKEFILEIN% goto src3
set MAKEFILEIN=makefile-in.in
if exist %MAKEFILEIN% goto src3
echo makefile: *** The file originally called "src/makefile.in.in" cannot be found.
cd ..
goto end
:src3
rem Create "paths.h" rem Create "paths.h"
sed -f ../msdos/sed4.inp <%PATHSH% >paths.tmp sed -f ../msdos/sed4.inp <paths.in >paths.tmp
update paths.tmp paths.h >nul update paths.tmp paths.h >nul
rm -f paths.tmp rm -f paths.tmp
rem Create "config.h" rem Create "config.h"
rm -f config.h2 config.tmp rm -f config.h2 config.tmp
cp %CONFIGH% config.tmp cp config.in config.tmp
if "%X11%" == "" goto src4 if "%X11%" == "" goto src4
sed -f ../msdos/sed2x.inp <%CONFIGH% >config.tmp sed -f ../msdos/sed2x.inp <config.in >config.tmp
:src4 :src4
sed -f ../msdos/sed2.inp <config.tmp >config.h2 sed -f ../msdos/sed2.inp <config.tmp >config.h2
update config.h2 config.h >nul update config.h2 config.h >nul
...@@ -134,11 +110,12 @@ rm -f config.tmp config.h2 ...@@ -134,11 +110,12 @@ rm -f config.tmp config.h2
rem On my system dir.h gets in the way. It's a VMS file so who cares. rem On my system dir.h gets in the way. It's a VMS file so who cares.
if exist dir.h ren dir.h vmsdir.h if exist dir.h ren dir.h vmsdir.h
rem Create "makefile" from "makefile.in.in". rem Create "makefile" from "makefile.in".
rm -f makefile junk.c rm -f makefile junk.c
sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c
gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile gcc -E junk.c | sed -f ../msdos/sed1.inp >makefile
rm -f junk.c rm -f junk.c
if "%X11%" == "" goto src5 if "%X11%" == "" goto src5
mv makefile makefile.tmp mv makefile makefile.tmp
sed -f ../msdos/sed1x.inp <makefile.tmp >makefile sed -f ../msdos/sed1x.inp <makefile.tmp >makefile
...@@ -153,17 +130,9 @@ cd .. ...@@ -153,17 +130,9 @@ cd ..
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
Echo Configuring the library source directory... Echo Configuring the library source directory...
cd lib-src cd lib-src
set MAKEFILEIN=makefile.in-in
if exist %MAKEFILEIN% goto libsrc1
set MAKEFILEIN=makefile-in.in
if exist %MAKEFILEIN% goto libsrc1
echo makefile: *** The file originally called "lib-src/Makefile.in.in" cannot be found.
cd ..
goto end
:libsrc1
rem Create "makefile" from "makefile.in". rem Create "makefile" from "makefile.in".
sed -e "1,/cpp stuff/s@^# .*$@@" <%MAKEFILEIN% >junk.c sed -e "1,/cpp stuff/s@^# .*$@@" <makefile.in >junk.c
gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >Makefile.new gcc -E -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new
sed -f ../msdos/sed3.inp <makefile.new >makefile sed -f ../msdos/sed3.inp <makefile.new >makefile
rm -f makefile.new junk.c rm -f makefile.new junk.c
if "%nodebug%" == "" goto libsrc2 if "%nodebug%" == "" goto libsrc2
...@@ -189,6 +158,3 @@ rem ---------------------------------------------------------------------- ...@@ -189,6 +158,3 @@ rem ----------------------------------------------------------------------
:end :end
set X11= set X11=
set nodebug= set nodebug=
set MAKEFILEIN=
set PATHSH=
set CONFIGH=
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment