\def\batchfile{install.ndx}
\def\filename{makendx}

{\immediate\openin15 docstrip.tex
\ifeof 15
\typeout{***********************************************}
\typeout{* Sorry can not find the file `docstrip.tex'. *}
\typeout{***********************************************}
\expandafter\aftergroup\csname @@end\expandafter\endcsname
\expandafter\aftergroup\csname end\expandafter\endcsname \fi}

\input docstrip.tex

\preamble

Copyright (C) 1996 by Wenzel Matiaske, mati1831@perform.ww.tu-berlin.de

You are not allowed to distribute this file without the
original source \filename.dtx. For distribution of the 
sources see the copyright notice in the file \filename.dtx.

\endpreamble

\keepsilent

\Msg{*** Generating the document packages files ***}

\generateFile{\filename.sty}{t}{\from{\filename.dtx}{package}}

\Msg{*** Generating the makeindex style ***}

\generateFile{\filename.ist}{t}{\from{\filename.dtx}{ist}}

\Msg{*** Generating the documentation driver ***}

\generateFile{\filename.drv}{t}{\from{\filename.dtx}{driver}}

\ifToplevel{
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{* \space\space makendx.sty}
\Msg{*}
\Msg{* Move the file}
\Msg{*}
\Msg{* \space\space makendx.ist}
\Msg{*}
\Msg{* file into a directory searched by MakeIndex.}
\Msg{*}
\Msg{* To produce the documentation run the files ending with}
\Msg{* `.drv' through LaTeX.}
\Msg{*}
\Msg{* Happy TeXing}
\Msg{***********************************************************}
}

\endinput