# use ` make -r' to cancel any implicit rules!

GOAL:=nulligarchie.info nulligarchie.html nulligarchie.ps
PIC:=keshan.png
EPS:= $(PIC:.png=.eps)

all: $(GOAL)

debug:
	echo $(PIC) $(EPS) $(TXT)

.PHONY: clean realclean
clean:
	rm -f *.pg *.fn *.ky *.log *.tp *.vr *.toc *.cp *.cps *.aux *.dvi

realclean: clean
	rm -f $(GOAL) $(EPS) $(TXT) 

%.eps: %.png
	convert $< $@

%.txt:
	echo > $@

%.html: %.texinfo html.patch
	export LANG=C; makeinfo --html $<
	patch < html.patch

%.dvi: %.texinfo $(EPS)
	texi2dvi nulligarchie.texinfo

%.ps: %.dvi
	dvips $<

%.info: %.texinfo
	makeinfo $< -o $@
