#!/usr/bin/make -f

# This file is part of the Debian `xypic' package version 3.0-1.
# Copyright (c) 1995  Erick Branderhorst. This is free software; you can
# can redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation; either 
# version 2 of the License, or (at your option) any later version.
	
DOC	= $(prefix)/doc
INST_DIR= install -g root -o root -d -m 755
INST_DAT= install -g root -o root -m 644

all:
	(cd src; make)
	gzip --best --stdout src/xyguide.dvi >xyguide.dvi.gz
	gzip --best --stdout src/xyguide.ps >xyguide.ps.gz
	gzip --best --stdout src/xyrefer.dvi >xyrefer.dvi.gz
	gzip --best --stdout src/xyrefer.ps >xyrefer.ps.gz
	gzip --best --stdout samples/debianxypic.tex >debianxypic.tex.gz
	gzip --best --stdout samples/debianxypic.dvi >debianxypic.dvi.gz
#	(cd samples; make)

install:
	(cd src; make install prefix=../$(prefix))
# the samples aren't included at this moment because they can't be (La)TeX
#	(cd samples; make install prefix=../$(prefix))

	$(INST_DIR)			$(DOC)
	$(INST_DIR)			$(DOC)/xypic
	$(INST_DAT) xyguide.*.gz	$(DOC)/xypic
	$(INST_DAT) xyrefer.*.gz	$(DOC)/xypic
	$(INST_DIR)			$(DOC)/examples
	$(INST_DIR)			$(DOC)/examples/xypic
	$(INST_DAT) debianxypic.*.gz	$(DOC)/examples/xypic

clean:
	rm -f *~ *.log ./#* *.gz
	(cd src; make clean)




