# Makefile for ~lp/html/settings

DIR = settings

.SUFFIXES: .html .tex

.tex.html: 
	sed -f ../tex2html $*.tex | sed -f ../tex2html > $*.html

all: files

again:
	make clean Makefile 
	make all

Makefile: clean 
	mv Makefile Makefile.bak
	/bin/rm -f Index.html *.tex
	ln -s ../../help/${DIR}/*.tex .
	grep -v '^files:' Makefile.bak > Makefile
	echo '<pre>' > Index.html
	for i in `ls *.tex | sed "s/.tex/.html/"`;		\
	    do echo files: $$i >> Makefile;			\
	       echo "<a href=\"$$i\">$$i</a>" >> Index.html;	\
	    done
	echo '</pre>' >> Index.html

xref:
	cat *.html						\
	  | tr '>' '\012' 					\
          | sed -n '/.*<a href="\([^"]*\)"/s//\1/p' 		\
          | sort -u						\
	  > tmp
	for j in `grep -v \# tmp`;				\
	    do if test -s $$j;					\
	       then true;					\
	       else echo $$j; 					\
	       fi;						\
	    done
	sed -n '/\(.*\)\#\(.*\)/s//if ( ! { grep -s name=\\"\2\\" \1 } ) echo \1	\2/p' tmp > tmp1
	csh -f tmp1

tidy:
	@/bin/rm -f *~ *.bak *.tex tmp tmp1

clean: tidy
	@/bin/rm -f *.html *.tex

files: activity.html
files: automatic-ordering.html
files: automatic-registry.html
files: box-checking.html
files: completion-mode.html
files: directory.html
files: display-mode.html
files: hardwired-usage.html
files: immunity.html
files: log.html
files: lp-path.html
files: name-prefix.html
files: ordering-method.html
files: page-mode.html
files: prompt.html
files: proof-methods.html
files: reduction-strategy.html
files: rewriting-limit.html
files: script.html
files: statistics-level.html
files: trace-level.html
files: write-mode.html
