##################################################################### ### ### Makefile for Singular documentation ### $Id: Makefile.in,v 1.62 2000-03-13 15:51:27 obachman Exp $ ##################################################################### SHELL=/bin/sh #################################################################### ## ## Configuration ## ## directory where info files are installed prefix = @prefix@ infodir = ${prefix}/info bindir = @bindir@ htmldir = ${prefix}/html exdir = ${prefix}/examples install_infodir = ${install_prefix}/info install_htmldir = ${install_prefix}/html install_docdir = ${install_prefix}/doc install_exdir = ${install_prefix}/examples # directory where files for ftp site go ftpdir = /tmp ## ## needed programs ## @SET_MAKE@ LN_S = @LN_S@ CC = @CC@ INSTALL = ../install-sh -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 MKINSTALLDIRS = ../mkinstalldirs GZIP = @GZIP@ PERL5 = @PERL5@ TEX = tex MAKEINFO = @MAKEINFO@ TEXI2DVI = @TEXI2DVI@ TEXINDEX = @TEXINDEX@ TEXI2HTML = @TEXI2HTML@ DVIPS = dvips VERBOSE = 1 # override this with make VERBOSE=2 SINGUNAME = @SINGUNAME@ # d2t stuff SINGULAR = @SINGULAR@ SINGULAR_LIB_DIR= ../Singular/LIB LIBPARSE = ${bindir}/libparse DOC_SUBDIR = ./d2t_singular EX_SUBDIR = ./examples CHKSUM_DB = ${DOC_SUBDIR}/chksum DOC2TEX = ${PERL5} ./doc2tex.pl -docdir ${DOC_SUBDIR} \ -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \ -exdir ${EX_SUBDIR} PL2DOC = ${PERL5} ./pl2doc.pl -db ${CHKSUM_DB} # t2h stuff TMP_DIR = @TMP_DIR@ HTML_SUBDIR = html TEXI2HTML_INIT = t2h_singular.init ifeq ($(VERBOSE),0) T2H_VERBOSE = -no_verbose else T2H_VERBOSE = -verbose endif TEXI2HTML_OPTS = -init_file ${TEXI2HTML_INIT} @TEXI2HTML_OPTS@ \ -short_extn -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \ ${T2H_VERBOSE} HTML_MANUAL_PREFIX = sing HTML_TUTOR_PREFIX = tut HTML_MANUAL_TOP = index.htm HTML_TUTOR_TOP = tutor.htm ## ## End configuration dependend stuff ################################################################# ########################################################### # File sets # STANDALONE_TEXI_FILES = COPYING.texi INSTALL_unix.texi NEWS.texi \ README_download.texi README_ftp.texi \ README_distribution.texi DOC2TEX_FILES = \ examples.tex general.tex math.tex reference.tex \ start.tex types.tex pdata.tex tricks.tex platform.tex MANUAL_FILES = ${TEX_FILES} ${DOC2TEX_FILES} TUTOR_FILES = \ tutor.tex examples.tex start.tex copyright.tex IMAGES_UU := $(wildcard images/*.uu) IMAGES := $(IMAGES_UU:images/%.uu=%) IMAGES_SRC := $(IMAGES:%=images/%) IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%) # prepend bindir to path so that programs from there are taken first export PATH := "${bindir}:${PATH}" ########################################################### # top targets # .PHONY: info dvi ps html # default target all: info dvi html singular.idx # info stuff info: singular.hlp singular.hlp: ${MANUAL_FILES} singular.tex - ${MAKEINFO} --no-split singular.tex # dvi stuff dvi: manual.dvi usercard.dvi singular.dvi: ${MANUAL_FILES} singular.tex ${TEXI2DVI} singular.tex manual.dvi: ${MANUAL_FILES} manual.tex ${TEXI2DVI} manual.tex tutor.dvi: ${TUTOR_FILES} ${TEXI2DVI} tutor.tex usercard.dvi: usercard.tex singcard.tex ${TEX} $< # postscript stuff ps: manual.ps usercard.ps usercard.ps: usercard.dvi ${DVIPS} -t landscape -t a4 $< -o $@ %.ps: %.dvi ${DVIPS} $< -o $@ ########################################################### # texinfo targets # manual.tex: ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES) ${DOC2TEX} -no_fun -o manual.tex singular.doc singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES) ${DOC2TEX} -o singular.tex singular.doc #pattern rule for tex files %_noEx.tex : %.doc doc2tex.pl ${SINGULAR} ${DOC2TEX} -o $@ -no_ex $< %.tex: %.doc doc2tex.pl ${SINGULAR} ${DOC2TEX} -o $@ $< # pattern rules for lib docus ${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE} test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR} ${LIBPARSE} -i $< > $@ %_noFun.doc : %.pl pl2doc.pl ${PL2DOC} -no_fun -o $@ $< %.doc : %.pl pl2doc.pl ${PL2DOC} -o $@ $< # do not delete intermediate .pl and .doc files .PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl # index file for help singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl ${PERL5} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx ########################################################### # stand-alone targest # STANDALONE_TXT_FILES := $(STANDALONE_TEXI_FILES:.texi=.txt) STANDALONE_HTML_FILES := $(STANDALONE_TEXI_FILES:.texi=.html) STANDALONE_FILES := $(STANDALONE_TEXI_FILES:.texi=) ifeq ($(SINGUNAME),@SINGUNAME@) UNAME_OPT = -D UNAME endif # targets which produce stand-alone documents %.${SINGUNAME}.txt : %.texi ${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none -o $@ $< %.txt : %.texi ${MAKEINFO} --no-header --paragraph-indent none -o $@ $< %.${SINGUNAME}.html : %.texi ${PERL5} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -verbose -split none -o $@ $< %.html : %.texi ${PERL5} ${TEXI2HTML} -init_file t2h_standalone.init -verbose -split none -o $@ $< % : %.txt cp $< $@ standalone: standalone-txt standalone-html ${STANDALONE_FILES} standalone-html: ${STANDALONE_HTML_FILES} standalone-txt: ${STANDALONE_TXT_FILES} WWW_DIR = /singular/www/2-0/ FTP_DIR = /ftp/pub/Math/Singular/Development install-standalone: standalone cp INSTALL_unix.html COPYING.html ${WWW_DIR} cp COPYING COPYING.html ${FTP_DIR} cp INSTALL_unix INSTALL_unix.html ${FTP_DIR} cp README_ftp.html ${FTP_DIR}/README.html cp README_ftp ${FTP_DIR}/README cp NEWS.html NEWS ${FTP_DIR} cp NEWS.html ${WWW_DIR} - chmod g+w ${FTP_DIR}/* ########################################################### # html targets # html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES) ${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \ -top_file ${HTML_MANUAL_TOP} singular.tex # html stuff html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex ${PERL5} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \ -top_file ${HTML_TUTOR_TOP} tutor.tex ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${TMP_DIR}: ${MKINSTALLDIRS} ${TMP_DIR} # pattern rules for images - but not everybody has gnu-uudecode images/%.gif : images/%.gif.uu cd images; uudecode ../$< ;cd .. images/%.jpg : images/%.jpg.uu cd images; uudecode ../$< ;cd .. images/%.xbm : images/%.xbm.uu cd images; uudecode ../$< ;cd .. ${IMAGES_HTML} : ${IMAGES_SRC} test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR} cp ${IMAGES_SRC} ${HTML_SUBDIR} ########################################################### # misc targets # install: singular.hlp html singular.idx ${MKINSTALLDIRS} ${infodir} ${INSTALL_DATA} singular.hlp ${infodir} test -r ${htmldir} || ln -s `pwd`/${HTML_SUBDIR} ${htmldir} test -r ${exdir} || ln -s `pwd`/${EX_SUBDIR} ${exdir} uninstall: rm -f ${infodir}/singular.hlp - rmdir ${infodir} #stupid HP's don't allow copy with many arguments install-sharedist: singular.hlp html singular.idx \ ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES} ${MKINSTALLDIRS} ${install_prefix} ${MKINSTALLDIRS} ${install_infodir} ${INSTALL_DATA} singular.hlp ${install_infodir} ${MKINSTALLDIRS} ${install_htmldir} cp ${HTML_SUBDIR}/*.htm ${install_htmldir} cp ${HTML_SUBDIR}/*.gif ${install_htmldir} cp ${HTML_SUBDIR}/*.jpg ${install_htmldir} chmod -R +rX ${install_htmldir} ${MKINSTALLDIRS} ${install_exdir} cp -R examples ${install_prefix} /bin/rm -f ${install_prefix}/examples/*.res /bin/rm -f ${install_prefix}/examples/*.inc chmod -R +rX ${install_prefix}/ ${MKINSTALLDIRS} ${install_docdir} ${INSTALL_DATA} singular.idx ${install_docdir} ${INSTALL_DATA} COPYING.txt ${install_prefix}/COPYING ${INSTALL_DATA} COPYING.html ${install_prefix} ${INSTALL_DATA} NEWS.txt ${install_prefix}/NEWS ${INSTALL_DATA} NEWS.html ${install_prefix} ${INSTALL_DATA} README_distribution.txt ${install_prefix}/README ${INSTALL_DATA} README_distribution.html ${install_prefix}/README.html # use 'make INSTALL_unix.olaf.txt INSTALL_unix.olaf.html SINGUNAME=olaf' # to generate these files for uname 'olaf' install-bindist: INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html ${MKINSTALLDIRS} ${install_prefix} ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.txt ${install_prefix}/INSTALL ${INSTALL_DATA} INSTALL_unix.${SINGUNAME}.html ${install_prefix}/INSTALL.html install-ftp: ${STANDALONE_HTML_FILES} ${STANDALONE_TXT_FILES} ${INSTALL_DATA} NEWS.txt ${ftpdir}/NEWS ${INSTALL_DATA} NEWS.html ${ftpdir} ${INSTALL_DATA} COPYING.txt ${ftpdir}/COPYING ${INSTALL_DATA} COPYING.html ${ftpdir} ${INSTALL_DATA} INSTALL_unix.txt ${ftpdir}/INSTALL_unix ${INSTALL_DATA} INSTALL_unix.html ${ftpdir} ${INSTALL_DATA} README_ftp.txt ${ftpdir}/README ${INSTALL_DATA} README_ftp.html ${ftpdir}/README.html texi2html = $(TEXI2HTML:%.pl=%) lib2doc.tar.gz: rm -rf lib2doc lib2doc.tar.gz mkdir lib2doc cp Makefile.lib2doc lib2doc/Makefile ${MAKEINFO} --no-header --paragraph-indent none -o lib2doc/README lib2doc.texi cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc tar cf lib2doc.tar lib2doc ${GZIP} lib2doc.tar clean: mostlyclean /bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR} mostlyclean: /bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt /bin/rm -f save_i test.ascii test.mp /bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps /bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp /bin/rm -f *.tps *.vr *.vrs *.dvi *.ps /bin/rm -f singular.hlp manual.hlp ${DOC2TEX_FILES} singular.idx /bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} /bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES} /bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html distclean: clean /bin/rm -f Makefile /bin/rm -rf ${HTML_SUBDIR} maintainer-clean: distclean ${SINGULAR}: # cd ..; ${MAKE} ${SINGULAR} Makefile: Makefile.in cd ..; ${MAKE} doc/Makefile html-done: ${MANUAL_FILES}