# ~jhs/public_html/brexit/russia/Makefile by Julian H. Stacey

all:	do_report_html index.html

clean:
	@echo "Avoiding removal of `pwd`/index.html"
	@true   # dummy
	@echo Suggestion: rm report-1_1.png report-2_1.png report-3_1.png

report_complex.pdf:
	ln -s report.pdf $@

# report.html:	report.pdf	# would conflict with order in .SUFFIXES
do_report_html:
	@echo "JJLATER next line FAILS: make PDF_TO_HTML_FORCE=YES report.html"
	@# host fire uname -r 9.2-RELEASE
	@#	pdftohtml report.pdf report.html
	@#		Error: PDF version 1.6 -- xpdf supports version 1.5 (continuing anyway)
	@#		Error (0): PDF file is damaged - attempting to reconstruct xref table...
	@#		Error: Couldn't find trailer dictionary
	@#		Error: Couldn't read xref table
	@# host lapr uname -r 12.3-STABLE	
	@#	pdftohtml report.pdf report.html
	@#		runs but report.html empty.
	-cd ${.CURDIR} ; make PDF_TO_HTML_FORCE=YES report.html

do_text:	reports.html

reports.html:
	@# textproc/html2text
	 html2text -o reports.txt $@

# report_complex.html:	report_complex.pdf	# would conflict with order in .SUFFIXES
do_report_complex.html:
	@# make PDF_TO_HTML_FORCE=YES report_complex.pdf report_complex.html
	@# Both of these
	@#   pdf-to-html -c report_complex.pdf report_complex.html
	@#   pdf-to-html -c report_complex.pdf report_complex
	@# Error with:
	@#   While reading gs_ll3.ps:
	@#  Error: /undefinedresource in findresource
	pdf-to-html -c report_complex.pdf report_complex

# report.txt:	report.pdf	# would conflict with order in .SUFFIXES
do_report_txt:
	make PDF_TO_TIFF_FORCE=YES report.tiff

report_from_ocr.txt report_ind.html:
	@echo "JJLATER need to add a rule for $@"

reports.txt:
	 @echo "JJLATER need to add a rule for $@"

# epub produced by calibre

# ../../src/bsd/fixes/FreeBSD/src/jhs/share/mk/berklix2.mk
.include <berklix.mk>
