MKDIR=mkdir
COPY=cp
all: hyperref test

hyperref: 
	latex hyperref.ins
	latex hyperref.dtx

test:
	latex test0
	latex test0

install:
	latex hyperref.ins
	(TEXMF=`kpsewhich -expand-var '$$TEXMFMAIN'`;$(MKDIR) $${TEXMF}/tex/latex/hyperref; $(COPY) *.sty *.def $${TEXMF}/tex/latex/hyperref)


normal:
	latex '\def\Status{0}\input manual'
	latex '\def\Status{0}\input manual'

pdf:
	pdflatex '\def\Status{1}\input manual'
	pdflatex '\def\Status{1}\input manual'

html:
	latex '\def\Status{2}\input manual'
	latex '\def\Status{2}\input manual'
	latex '\def\Status{2}\input manual'
	tex4ht manual
	perl tex4ht.perl manual

clean:
	-rm *.aux *.toc *.idx *.drv   *.dvi *.log *.rep *.lof *.brf *.tmp *.ist *.ilg *.ind *.out  *.css *.html
	-rm nameref.sty 
	-rm backref.sty 
	-rm hyperref.sty 
	-rm *.def htex4ht.cfg *.otc *.idv *.lg *.xref


distrib:
	(cd ..; zip -r hyperref hyperref/hyl* hyperref/hyperref.dtx \
	hyperref/nameref.dtx \
	hyperref/backref.dtx \
	hyperref/*.txt hyperref/test*.tex hyperref/test7.pdf hyperref/hyperref.ins \
	hyperref/makefile \
	hyperref/picture.* hyperref/ChangeLog \
	hyperref/xr-hyper.sty \
	hyperref/minitoc_href.sty hyperref/manual.pdf )

