# Generated automatically from Makefile.in by configure.
include ../../include/config.Makefile
IMAGES = \
	up.gif next.gif previous.gif top.gif index.gif null.gif \
	recbg.jpg 9planets.gif
all :: $(IMAGES)
all :: index.html

# for gimp to find this *.scm file, put
# (script-fu-path "${gimp_dir}/scripts:${gimp_data_dir}/scripts:/home/geometry/dan/src/M2/Macaulay2/html")
# into ~/.gimp/gimprc

# the .gif files are part of the distribution, so you don't usually need gimp
# that also explains why these make rules operate in the source directory!
# and why setting VPATH would be bad

# The following lines are commented out because gimp fails to execute my commands now.
# Oh well, we have the gif files already.  Here is the error message from gimp:
#   batch command: experienced an execution error.
#   batch command: experienced an execution error.
#   Gtk-CRITICAL **: file gtkmain.c: line 534 (gtk_main_quit): assertion `main_loops != NULL' failed.
# Not very illuminating!  It's impossible to debug gimp code.
# And after all that, it doesn't even give a nonzero return code.

## ./up.gif : ./Macaulay2-button.scm
## 	cd .; gimp -b "(Macaulay2-button \"Up\" \"up.gif\")"  -b '(gimp-quit 0)'
## ./next.gif : ./Macaulay2-button.scm
## 	cd .; gimp -b "(Macaulay2-button \"Next\" \"next.gif\")"  -b '(gimp-quit 0)'
## ./previous.gif : ./Macaulay2-button.scm
## 	cd .; gimp -b "(Macaulay2-button \"Previous\" \"previous.gif\")"  -b '(gimp-quit 0)'
## ./index.gif : ./Macaulay2-button.scm
## 	cd .; gimp -b "(Macaulay2-button \"Index\" \"index.gif\")"  -b '(gimp-quit 0)'
## ./top.gif : ./Macaulay2-button.scm
## 	cd .; gimp -b "(Macaulay2-button \"Top\" \"top.gif\")"  -b '(gimp-quit 0)'
## ./null.gif : ./Macaulay2-empty-button.scm
## 	cd .; gimp -b "(Macaulay2-empty-button \"null.gif\")"  -b '(gimp-quit 0)'

ifneq "." "."
up.gif : ./up.gif ; cp $< $@
next.gif : ./next.gif ; cp $< $@
previous.gif : ./previous.gif ; cp $< $@
index.gif : ./index.gif ; cp $< $@
top.gif : ./top.gif ; cp $< $@
null.gif : ./null.gif ; cp $< $@
recbg.jpg : ./recbg.jpg ; cp $< $@
9planets.gif : ./9planets.gif ; cp $< $@
clean ::; rm -f *.gif *.jpg
endif

index.html : ./html.m2 ../cache/Macaulay2-made ../cache/Macaulay2-doc
	rm -f ./*.html
	../../bin/M2 -q $< '-eexit(0)'
view:; netscape index.html &
clean::; rm -f ./*.html
clean::; rm -rf *.doc *.fn *.hl *.inv* *.cat *.src *.dct Macaulay2-index-cache
distclean: clean; rm -f Makefile
$(packagedir)/html:; $(INSTALL) -d "$@"
install:: $(packagedir)/html
	$(INSTALL_DATA) Makefile $(IMAGES) *.html ./html.m2 $(packagedir)/html

