TARGETDIR=/home/ftp/pub/html

all:	index html

index:	reportsA.bib reportsB.bib
	bibtex reportsA
	bibtex reportsB
	cat reportsA.bbl reportsB.bbl >reports.bbl
	rm -f ../index
	mv reports.bbl ../index
	chmod 664 ../index
	chgrp www-data ../index

html:	reportsA.bib reportsB.bib
	bibtex htmlindexA
	bibtex htmlindexB
	cat htmlindexA.prologue htmlindexA.bbl htmlindexB.prologue htmlindexB.bbl htmlindex.epilogue > htmlindex.html
	rm -f $(TARGETDIR)/reports.html
	mv htmlindex.html $(TARGETDIR)/reports.html
	chmod 664 $(TARGETDIR)/reports.html
	chgrp www-data $(TARGETDIR)/reports.html

.PHONY: all index html
