# Copyright (c) 2002 by Wayne C. Gramlich.
# All rights reserved.

# Permission to use, copy, modify, distribute, and sell this software
# for any purpose is hereby granted without fee provided that the above
# copyright notice and this permission are retained.  The author makes
# no representations about the suitability of this software for any purpose.
# It is provided "as is" without express or implied warranty.

ROOT := ../../..

include $(ROOT)/Makefile_common.mk
include $(ROOT)/Makefile_private.mk

OPTIONS :=			\
	--bodyfont helvetica	\
	--fontsize 24.0		\
	--no-title		\
	--no-toc		\
	-t pdf12

HTMLS :=			\
	title.html		\
	what_is_it.html		\
	pic.html		\
	cost.html		\
	program.html		\
	ucl.html		\
	ide.html		\
	pda.html		\
	oopic.html		\
	summary.html

all: talk.pdf index.html

index.html: ${HTMLS} Makefile
	echo "<HTML>" >$@
	echo "<Head>" >> $@
	echo "<Title>RoboBricks 2002-01-30 Talk</Title>" >> $@
	echo "</Head>" >> $@
	echo "<Body>" >> $@
	echo "<P>" >> $@
	echo "These are the slides for a" >> $@
	echo "<A HRef=\"../index.html\">RoboBricks</A> talk" >> $@
	echo "</P>" >> $@
	echo "<H1>RoboBricks 2002-01-30 Talk</H1>" >> $@
	echo "<P>The <A HRef=\"talk.pdf\">talk.pdf</A> file is" >> $@
	echo "generated from the following files:" >> $@
	echo "<OL>" >> $@
	for f in ${HTMLS} ; 					\
	  do							\
	    echo "<LI><A HRef=\"$$f\">$$f</A></LI>" >> $@ ;	\
	  done
	echo "</OL>" >> $@
	echo "</P>" >> $@
	echo "<P>" >> $@
	echo "A <A HRef=\"Makefile\">Makefile</A> is used to" >> $@
	echo "do all the work." >> $@
	echo "</P>" >> $@
	echo "<HR>" >> $@
	echo "<Address>" >> $@
	echo "<A HRef=\"../../../../copyright.html\">Copyright</A>" >> $@
	echo "(c) 2002 by" >> $@
	echo "<A HRef=\"../../../../gramlich.html\">Wayne C. Gramlich</A>." >> $@
	echo "All rights reserved." >> $@
	echo "<Address>" >> $@
	echo "</Body>" >> $@
	echo "</HTML>" >> $@

talk.pdf: title.html ${HTMLS}
	htmldoc --book -f $@ $(OPTIONS) ${HTMLS}

clean:
	rm -f talk.pdf index.html
	$(CLEAN)
