# MSDos-Makefile

### variables to configure for the local system

#installation directories
TEXINPUTS   = .
TEXDOCS_SRC = .
TEXDOCS_DVI = $(TEXDOCS_SRC)
TEXDOCS_PS  = $(TEXDOCS_SRC)

#executables
LATEX = latex
DVIPS = dvips -z -o

THEMAKE  = $(MAKE) -f Makefile-MSDos

COPY  = copy
ECHO  = echo
MKDIR = mkdir
RM    = del

### do not change anything beyond this line

PACKAGE = hyper

default: $(PACKAGE).dvi

$(PACKAGE).dvi: $(PACKAGE).dtx
	$(LATEX) $(PACKAGE).dtx
	$(LATEX) $(PACKAGE).dtx
	$(LATEX) $(PACKAGE).dtx

$(PACKAGE).ps: $(PACKAGE).dvi
	$(DVIPS) $(PACKAGE).ps $(PACKAGE).dvi

files: $(PACKAGE).ins $(PACKAGE).dtx
	$(LATEX) $(PACKAGE).ins

install:
	$(THEMAKE) -s install-info
	
install-info:
	$(ECHO) "After configuring the Makefile call:"
	$(ECHO) "  $(THEMAKE) install-package to install the package (without sources)"
	$(ECHO) "  $(THEMAKE) install-doc     to install the documentation sources"
	$(ECHO) "  $(THEMAKE) install-dvi     to install the documentation in dvi-format"
	$(ECHO) "  $(THEMAKE) install-ps      to install the documentation in ps-format"
	$(ECHO) "  $(THEMAKE) install-all     to install the package and the documentation"

install-package: files
	-$(MKDIR) $(TEXINPUTS)
	$(COPY) *.sty $(TEXINPUTS)
	$(COPY) *.hyp $(TEXINPUTS)
	$(COPY) contrib\*.hyp $(TEXINPUTS)
	$(COPY) scontrib\*.hyp $(TEXINPUTS)

install-doc: $(PACKAGE).dtx
	- $(MKDIR) $(TEXDOCS_SRC)
	$(COPY) $(PACKAGE).dtx $(TEXDOCS_SRC)

install-dvi: $(PACKAGE).dvi
	-$(MKDIR) $(TEXDOCS_DVI)
	$(COPY) $(PACKAGE).dvi $(TEXDOCS_DVI)

install-ps: $(PACKAGE).ps
	-$(MKDIR) $(TEXDOCS_PS)
	$(COPY) $(PACKAGE).ps $(TEXDOCS_PS)

install-all: install-package install-doc install-dvi install-ps

clean:
	$(RM) *.aux *.cfg *.dvi *.hyp *.log *.ps *.sty *.toc