XCOMM $ITI: Imakefile,v 1.1 1995/05/09 01:59:17 schrod Exp $
/* ---------------------------------------------------------------------- */

/*
 * Imakefile for LaTeX document class `tdsguide'
 *
 */


/* needed modules */
#include <TeX.imk>
#include <install/TeX.imk>	/* for root of TDS tree */

XCOMM ------------------------------------------------------------
XCOMM continue in Imakefile


TeXTarget(latex,tds)


/* ------------------------------------------------------------
 *
 * create a distributable version
 */

    LATEX = $(TEXMF)/tex/latex
    CTAN = from CTAN, directory /tex-archive/macros/latex

/* list of used, package-external files */
    PATH_STY = $(TEXMF)/tex/generic/misc/path.sty
    MFLOGO_STY = $(LATEX)/mflogo/?*
    FANCYHEADINGS_STY = $(LATEX)/fancyheadings/fancyheadings.sty
    TDS_DOC = /common/ftp/pub/tex/TDS/draft/tds.tex

dist::
	$(RM) -r dist
	mkdir dist
	decomment-tex tdsguide.cls >dist/tdsguide.cls
	decomment-tex $(PATH_STY) '$(CTAN)/contrib/misc' >dist/path.sty
	decomment-tex $(LATEX)/mflogo/mflogo.sty '$(CTAN)/supported/mflogo' \
		>dist/mflogo.sty
	decomment-tex $(LATEX)/mflogo/Ulogo.fd '$(CTAN)/supported/mflogo' \
		>dist/Ulogo.fd
	decomment-tex $(FANCYHEADINGS_STY) \
		'$(CTAN)209/contrib/fancyheadings' \
		>dist/fancyheadings.sty
	( \
	    cd dist ; \
	    texar ../tds.tex * >../tds-dist.tex ; \
	)
	$(RM) -r dist

realclean::
	$(RM) tds-dist.tex


/*
 * export my whole stuff
 */

export:: current-tds tex-tds collect-scripts /* collect-styles */ dist

current-tds::
	if [ -f $(TDS_DOC) ] ; \					@@\
	   then cp $(TDS_DOC) . ; \					@@\
	   else	test -f tds.tex ; \					@@\
	fi

tex-tds:: all
	mv tds.dvi tds.dvi.sav
	$(MAKE) clean
	mv tds.dvi.sav tds.dvi

collect-scripts::
	$(MAKEDIR) scripts
	$(COPYIF) $(HOME)/bin/decomment-tex $(HOME)/bin/texar \
		  /usr/local/bin/tex-it \
		  scripts

collect-styles::
	$(MAKEDIR) styles
	$(COPYIF) $(PATH_STY) $(MFLOGO_STY) $(FANCYHEADINGS_STY) styles

realclean::
	$(RM) -r tds.tex scripts styles

export::
	cp Makefile.export Makefile
	$(RM) -r CVS
	$(RM) .cvsignore .rcsrc
	pwd=`pwd`; pwd=`suffix $$pwd /`; cd ..; gtar -czvf $$pwd.tar.gz $$pwd


/* ============================================================
 *
 * $ITIlog: Imakefile,v $
 * Revision 1.1  1995/05/09  01:59:17  schrod
 *     Initial revision.
 *

 * ------------------------------------------------------------
 * Local Variables:
 * mode: Indented-Text
 * End:
 */
