
subdir = src/input/

IN=$(axiom_src_srcdir)/input
OUT=$(axiom_targetdir)/input
DOC=$(axiom_target_docdir)/src/input


ASFILES=${OUT}/aseg6.as   ${OUT}/aseg7.as  ${OUT}/ecfact.as \
        ${OUT}/hilbert.as ${OUT}/matops.as ${OUT}/pdecomp0.as \
        ${OUT}/romnum.as

FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
       ${OUT}/allfact.input    ${OUT}/antoine.input  \
       ${OUT}/arrows.input \
       ${OUT}/assign.input   ${OUT}/atansqrt.input   ${OUT}/axiom.input \
       ${OUT}/bags.input     ${OUT}/bern.input \
       ${OUT}/bernpoly.input \
       ${OUT}/bouquet.input  ${OUT}/bug6357.input \
       ${OUT}/bug9057.input  ${OUT}/bug10069.input   ${OUT}/bug10312.input \
       ${OUT}/cardinal.input \
       ${OUT}/cdraw.input      \
       ${OUT}/ch.input       ${OUT}/clifford.input   \
       ${OUT}/coercels.input ${OUT}/collect.input    ${OUT}/color.input \
       ${OUT}/cone.input       ${OUT}/conformal.input \
       ${OUT}/constant.input \
       ${OUT}/contfrac.input ${OUT}/coordsys.input \
       ${OUT}/curl.input     \
       ${OUT}/cycles.input   ${OUT}/cycloid.input  \
       ${OUT}/cycloid2.input \
       ${OUT}/cycloid3.input ${OUT}/cyfactor.input   ${OUT}/damped.input \
       ${OUT}/danzwill.input ${OUT}/defs.input \
       ${OUT}/defintef.input ${OUT}/defintrf.input   \
       ${OUT}/de2re.input \
       ${OUT}/dhtri.input    ${OUT}/dirichlet.input  ${OUT}/divisor.input \
       ${OUT}/dpol.input       ${OUT}/draw2dSF.input \
       ${OUT}/drawalg.input  ${OUT}/drawcfn.input \
       ${OUT}/drawcfun.input ${OUT}/drawcurv.input \
       ${OUT}/draw.input     ${OUT}/drawcx.input     ${OUT}/drawex.input \
       ${OUT}/drawpoly.input ${OUT}/drawx.input    \
       ${OUT}/efi.input        ${OUT}/egg.input      \
       ${OUT}/eigen.input \
       ${OUT}/elemfun.input  ${OUT}/elemnum.input    ${OUT}/elfuts.input \
       ${OUT}/elt.input \
       ${OUT}/equation.input \
       ${OUT}/errortrap.input \
       ${OUT}/eval.input     ${OUT}/expexpan.input \
       ${OUT}/explim.input   ${OUT}/explot2d.input   \
       ${OUT}/exprpoly.input \
       ${OUT}/ffdemo.input \
       ${OUT}/fferr.input    ${OUT}/ffx72.input \
       ${OUT}/fib.input      ${OUT}/fixed.input \
       ${OUT}/float2.input \
       ${OUT}/float.input    ${OUT}/fname.input \
       ${OUT}/fnla.input     ${OUT}/folium.input   \
       ${OUT}/fparfrac.input \
       ${OUT}/fr.input       ${OUT}/gary1.input \
       ${OUT}/genups.input     ${OUT}/gnarly1.input \
       ${OUT}/gonshor.input  ${OUT}/grdef.input    \
       ${OUT}/heat.input       ${OUT}/helix.input \
       ${OUT}/huang.input \
       ${OUT}/ico.input      ${OUT}/ideal.input      ${OUT}/ifact.input \
       ${OUT}/images1.input  ${OUT}/images1a.input   ${OUT}/images3a.input \
       ${OUT}/images3.input  ${OUT}/images6.input    ${OUT}/images6a.input \
       ${OUT}/images7.input  ${OUT}/images7a.input   ${OUT}/infprod.input \
       ${OUT}/intaf.input    ${OUT}/intdeq.input     ${OUT}/intef.input \
       ${OUT}/intg0.input    \
       ${OUT}/intlf.input    ${OUT}/intmix.input     ${OUT}/intrf.input \
       ${OUT}/ipftest.input  ${OUT}/is.input         ${OUT}/isprime.input \
       ${OUT}/knot.input \
       ${OUT}/kovacic.input  ${OUT}/kuipers.input    \
       ${OUT}/laplace.input  ${OUT}/leg.input        \
       ${OUT}/limit.input \
       ${OUT}/lindep.input   ${OUT}/liss1.input      ${OUT}/liss2.input \
       ${OUT}/lode.input       ${OUT}/lodesys.input \
       ${OUT}/lodof.input \
       ${OUT}/lodo.input     \
       ${OUT}/lump.input \
       ${OUT}/lupfact.input  \
       ${OUT}/macbug.input \
       ${OUT}/macros.input   ${OUT}/mantepse.input   ${OUT}/marcbench.input  \
       ${OUT}/mapleok.input  ${OUT}/matbug.input \
       ${OUT}/matrix22.input ${OUT}/matrix.input     \
       ${OUT}/mfinfact.input ${OUT}/mountain.input \
       ${OUT}/mset.input       \
       ${OUT}/multfact.input ${OUT}/multKnot.input   ${OUT}/mult3d.input \
       ${OUT}/multiple.input \
       ${OUT}/negfloats.input \
       ${OUT}/newton.input \
       ${OUT}/nlode.input    ${OUT}/noonburg.input \
       ${OUT}/ntube.input    ${OUT}/ode.input \
       ${OUT}/octonion.input \
       ${OUT}/opalg.input    ${OUT}/operator.input   ${OUT}/op.input \
       ${OUT}/padic.input    ${OUT}/palette.input \
       ${OUT}/parpcurv.input ${OUT}/parscurv.input   ${OUT}/parsurf.input \
       ${OUT}/pascal1.input \
       ${OUT}/pascal.input   ${OUT}/patmatch.input   \
       ${OUT}/perm.input     ${OUT}/pfr.input        \
       ${OUT}/pinch.input    ${OUT}/plotfile.input   ${OUT}/pollevel.input \
       ${OUT}/pmint.input    ${OUT}/polycoer.input \
       ${OUT}/psgenfcn.input   \
       ${OUT}/ribbon.input   \
       ${OUT}/ribbons.input  ${OUT}/rk4draw.input  \
       ${OUT}/r20abugs.input \
       ${OUT}/r20bugs.input  ${OUT}/r21bugsbig.input \
       ${OUT}/r21bugs.input \
       ${OUT}/radff.input   \
       ${OUT}/reclos.input   \
       ${OUT}/robidoux.input ${OUT}/roots.input \
       ${OUT}/ruleset.input  ${OUT}/rules.input      ${OUT}/saddle.input \
       ${OUT}/scherk.input   ${OUT}/scope.input \
       ${OUT}/series2.input \
       ${OUT}/series.input   ${OUT}/sersolve.input   \
       ${OUT}/sinCosEx.input ${OUT}/sininv.input     ${OUT}/sinsin.input \
       ${OUT}/sinsin2.input  ${OUT}/skew.input \
       ${OUT}/slowint.input  ${OUT}/solvetra.input   ${OUT}/space3.input \
       ${OUT}/spiral.input \
       ${OUT}/stream2.input  ${OUT}/streams.input \
       ${OUT}/synonym.input  ${OUT}/t111293.input \
       ${OUT}/tanatan.input    ${OUT}/tensor.input   ${OUT}/test.input \
       ${OUT}/tetra.input    ${OUT}/tknot.input \
       ${OUT}/tree.input \
       ${OUT}/triglim.input  ${OUT}/tschirn.input ${OUT}/tsetcatbutcher.input \
       ${OUT}/tsetcatchemical.input ${OUT}/tsetcatvermeer.input \
       ${OUT}/tutchap1.input ${OUT}/tutchap2.input   ${OUT}/tutchap3.input \
       ${OUT}/tutchap4.input ${OUT}/tutchap67.input  ${OUT}/typo.input     \
       ${OUT}/unittest.input  ${OUT}/vectors.input  ${OUT}/viewdef.input \
       ${OUT}/wiggle.input   \
       ${OUT}/zimmer.input

FILES2=${OUT}/arith.input    ${OUT}/bugs.input \
       ${OUT}/calculus2.input \
       ${OUT}/curl.input     \
       ${OUT}/equation2.input \
       ${OUT}/exint.input      ${OUT}/exlap.input \
       ${OUT}/expr.input     ${OUT}/exprode.input    \
       ${OUT}/exsum.input    ${OUT}/fns.input        \
       ${OUT}/function.input ${OUT}/galois.input     \
       ${OUT}/grpthry.input \
       ${OUT}/help.input     \
       ${OUT}/knot2.input      ${OUT}/linalg.input \
       ${OUT}/loop.input \
       ${OUT}/numbers.input \
       ${OUT}/parabola.input ${OUT}/pat.input        \
       ${OUT}/poly.input     ${OUT}/reductio.input   ${OUT}/repa6.input \
       ${OUT}/spadprof.input \
       ${OUT}/synonym2.input ${OUT}/torus.input      

BROKEN=${OUT}/as-eg1.input   ${OUT}/as-eg2.input     ${OUT}/as-eg3.input \
       ${OUT}/as-eg4.input   ${OUT}/as-eg5.input     ${OUT}/as-eg6.input 

#   This viewport has already been closed!
VIEWPORT=${OUT}/graphics.input 

# Error: Value stack overflow.
VALUESTACK=${OUT}/images2a.input ${OUT}/images2.input  ${OUT}/images5a.input \
           ${OUT}/images5.input  ${OUT}/images8a.input ${OUT}/images8.input  \
           ${OUT}/mult2d.input   ${OUT}/plotlist.input 

# documented test cases 
DOCFILES= \
  ${DOC}/algaggr.input.dvi     ${DOC}/algbrbf.input.dvi    \
  ${DOC}/algfacob.input.dvi    ${DOC}/alist.input.dvi      \
  ${DOC}/allfact.input.dvi     ${DOC}/antoine.input.dvi    \
  ${DOC}/arith.input.dvi       ${DOC}/array1.input.dvi     \
  ${DOC}/array2.input.dvi      ${DOC}/arrows.input.dvi     \
  ${DOC}/as-eg1.input.dvi      ${DOC}/as-eg2.input.dvi     \
  ${DOC}/as-eg3.input.dvi      ${DOC}/as-eg4.input.dvi     \
  ${DOC}/as-eg5.input.dvi      ${DOC}/aseg6.as.dvi         \
  ${DOC}/as-eg6.input.dvi      ${DOC}/aseg7.as.dvi         \
  ${DOC}/assign.input.dvi      ${DOC}/atansqrt.input.dvi   \
  ${DOC}/axiom.input.dvi       ${DOC}/bags.input.dvi       \
  ${DOC}/bbtree.input.dvi      ${DOC}/bern.input.dvi       \
  ${DOC}/bernpoly.input.dvi    ${DOC}/binary.input.dvi     \
  ${DOC}/bop.input.dvi         ${DOC}/bouquet.input.dvi    \
  ${DOC}/bstree.input.dvi      ${DOC}/bug10069.input.dvi   \
  ${DOC}/bug10312.input.dvi    ${DOC}/bug6357.input.dvi    \
  ${DOC}/bug9057.input.dvi     ${DOC}/bugs.input.dvi       \
  ${DOC}/bugs2007.input.dvi \
  ${DOC}/bugs2008.input.dvi \
  ${DOC}/bugs2009.input.dvi \
  ${DOC}/i-bugs2007.input.dvi \
  ${DOC}/i-bugs2008.input.dvi \
  ${DOC}/c02aff.input.dvi      ${DOC}/c02agf.input.dvi     \
  ${DOC}/c05adf.input.dvi      ${DOC}/c05nbf.input.dvi     \
  ${DOC}/c05pbf.input.dvi      ${DOC}/c06eaf.input.dvi     \
  ${DOC}/c06ebf.input.dvi      ${DOC}/c06ecf.input.dvi     \
  ${DOC}/c06ekf.input.dvi      ${DOC}/c06fpf.input.dvi     \
  ${DOC}/c06fqf.input.dvi      ${DOC}/c06frf.input.dvi     \
  ${DOC}/c06fuf.input.dvi      ${DOC}/c06gbf.input.dvi     \
  ${DOC}/c06gcf.input.dvi      ${DOC}/c06gqf.input.dvi     \
  ${DOC}/c06gsf.input.dvi      ${DOC}/calculus2.input.dvi  \
  ${DOC}/cardinal.input.dvi   \
  ${DOC}/card.input.dvi        ${DOC}/carten.input.dvi     \
  ${DOC}/cclass.input.dvi      ${DOC}/cdraw.input.dvi      \
  ${DOC}/char.input.dvi        ${DOC}/ch.input.dvi         \
  ${DOC}/clifford.input.dvi    ${DOC}/clif.input.dvi       \
  ${DOC}/coercels.input.dvi    ${DOC}/collect.input.dvi    \
  ${DOC}/color.input.dvi       \
  ${DOC}/cone.input.dvi        ${DOC}/conformal.input.dvi  \
  ${DOC}/constant.input.dvi    ${DOC}/contfrac.input.dvi   \
  ${DOC}/contfrc.input.dvi     ${DOC}/coordsys.input.dvi   \
  ${DOC}/curl.input.dvi        ${DOC}/cycles1.input.dvi    \
  ${DOC}/cycles.input.dvi      ${DOC}/cycloid2.input.dvi   \
  ${DOC}/cycloid3.input.dvi    ${DOC}/cycloid.input.dvi    \
  ${DOC}/cyfactor.input.dvi    ${DOC}/d01ajf.input.dvi     \
  ${DOC}/d01akf.input.dvi      ${DOC}/d01alf.input.dvi     \
  ${DOC}/d01amf.input.dvi      ${DOC}/d01anf.input.dvi     \
  ${DOC}/d01apf.input.dvi      ${DOC}/d01aqf.input.dvi     \
  ${DOC}/d01asf.input.dvi      ${DOC}/d01bbf.input.dvi     \
  ${DOC}/d01fcf.input.dvi      ${DOC}/d01gaf.input.dvi     \
  ${DOC}/d01gbf.input.dvi      ${DOC}/d02bbf.input.dvi     \
  ${DOC}/d02bhf.input.dvi      ${DOC}/d02cjf.input.dvi     \
  ${DOC}/d02ejf.input.dvi      ${DOC}/d02gaf.input.dvi     \
  ${DOC}/d02gbf.input.dvi      ${DOC}/d02kef.input.dvi     \
  ${DOC}/d02raf.input.dvi      ${DOC}/d03edf.input.dvi     \
  ${DOC}/d03eef.input.dvi      ${DOC}/d03faf.input.dvi     \
  ${DOC}/damped.input.dvi      ${DOC}/danzwill.input.dvi   \
  ${DOC}/de2re.input.dvi       ${DOC}/decimal.input.dvi    \
  ${DOC}/defintef.input.dvi    ${DOC}/defintrf.input.dvi   \
  ${DOC}/defs.input.dvi        ${DOC}/derham.input.dvi     \
  ${DOC}/dfloat.input.dvi      ${DOC}/dhtri.input.dvi      \
  ${DOC}/dirichlet.input.dvi \
  ${DOC}/divisor.input.dvi     ${DOC}/dmp.input.dvi        \
  ${DOC}/dpol.input.dvi        \
  ${DOC}/draw2dSF.input.dvi    ${DOC}/drawalg.input.dvi    \
  ${DOC}/drawcfn.input.dvi     ${DOC}/drawcfun.input.dvi   \
  ${DOC}/drawcurv.input.dvi    ${DOC}/drawcx.input.dvi     \
  ${DOC}/drawex.input.dvi      ${DOC}/draw.input.dvi       \
  ${DOC}/drawpoly.input.dvi    ${DOC}/drawx.input.dvi      \
  ${DOC}/dropt.input.dvi       ${DOC}/e01baf.input.dvi     \
  ${DOC}/e01bef.input.dvi      ${DOC}/e01bff.input.dvi     \
  ${DOC}/e01bgf.input.dvi      ${DOC}/e01bhf.input.dvi     \
  ${DOC}/e01daf.input.dvi      ${DOC}/e01saf.input.dvi     \
  ${DOC}/e01sbf.input.dvi      ${DOC}/e01sef.input.dvi     \
  ${DOC}/e01sff.input.dvi      ${DOC}/e02adf.input.dvi     \
  ${DOC}/e02aef.input.dvi      ${DOC}/e02agf.input.dvi     \
  ${DOC}/e02ahf.input.dvi      ${DOC}/e02ajf.input.dvi     \
  ${DOC}/e02akf.input.dvi      ${DOC}/e02baf.input.dvi     \
  ${DOC}/e02bbf.input.dvi      ${DOC}/e02bcf.input.dvi     \
  ${DOC}/e02bdf.input.dvi      ${DOC}/e02bef.input.dvi     \
  ${DOC}/e02daf.input.dvi      ${DOC}/e02dcf.input.dvi     \
  ${DOC}/e02ddf.input.dvi      ${DOC}/e02def.input.dvi     \
  ${DOC}/e02dff.input.dvi      ${DOC}/e02gaf.input.dvi     \
  ${DOC}/e02zaf.input.dvi      ${DOC}/e04dgf.input.dvi     \
  ${DOC}/e04fdf.input.dvi      ${DOC}/e04gcf.input.dvi     \
  ${DOC}/e04jaf.input.dvi      ${DOC}/e04mbf.input.dvi     \
  ${DOC}/e04naf.input.dvi      ${DOC}/e04ucf.input.dvi     \
  ${DOC}/e04ycf.input.dvi      ${DOC}/easter.input.dvi     \
  ${DOC}/ecfact.as.dvi         ${DOC}/efi.input.dvi        \
  ${DOC}/egg.input.dvi         ${DOC}/eigen.input.dvi      \
  ${DOC}/elemfun.input.dvi     ${DOC}/elemnum.input.dvi    \
  ${DOC}/elfuts.input.dvi      ${DOC}/elt.input.dvi        \
  ${DOC}/equation2.input.dvi   ${DOC}/equation.input.dvi   \
  ${DOC}/errortrap.input.dvi   ${DOC}/evalex.input.dvi     \
  ${DOC}/eval.input.dvi        ${DOC}/exdiff.input.dvi     \
  ${DOC}/exint.input.dvi       ${DOC}/exit.input.dvi       \
  ${DOC}/exlap.input.dvi       ${DOC}/exlimit.input.dvi    \
  ${DOC}/expexpan.input.dvi    ${DOC}/explim.input.dvi     \
  ${DOC}/explot2d.input.dvi    \
  ${DOC}/expr.input.dvi        \
  ${DOC}/exprode.input.dvi     ${DOC}/exprpoly.input.dvi   \
  ${DOC}/exseries.input.dvi    ${DOC}/exsum.input.dvi      \
  ${DOC}/f01brf.input.dvi      ${DOC}/f01bsf.input.dvi     \
  ${DOC}/f01maf.input.dvi      ${DOC}/f01mcf.input.dvi     \
  ${DOC}/f01qcf.input.dvi      ${DOC}/f01qdf.input.dvi     \
  ${DOC}/f01qef.input.dvi      ${DOC}/f01rcf.input.dvi     \
  ${DOC}/f01rdf.input.dvi      ${DOC}/f01ref.input.dvi     \
  ${DOC}/f02aaf.input.dvi      ${DOC}/f02abf.input.dvi     \
  ${DOC}/f02adf.input.dvi      ${DOC}/f02aef.input.dvi     \
  ${DOC}/f02aff.input.dvi      ${DOC}/f02agf.input.dvi     \
  ${DOC}/f02ajf.input.dvi      ${DOC}/f02akf.input.dvi     \
  ${DOC}/f02awf.input.dvi      ${DOC}/f02axf.input.dvi     \
  ${DOC}/f02bbf.input.dvi      ${DOC}/f02bjf.input.dvi     \
  ${DOC}/f02fjf.input.dvi      ${DOC}/f02wef.input.dvi     \
  ${DOC}/f02xef.input.dvi      ${DOC}/f04adf.input.dvi     \
  ${DOC}/f04arf.input.dvi      ${DOC}/f04asf.input.dvi     \
  ${DOC}/f04atf.input.dvi      ${DOC}/f04axf.input.dvi     \
  ${DOC}/f04faf.input.dvi      ${DOC}/f04jgf.input.dvi     \
  ${DOC}/f04maf.input.dvi      ${DOC}/f04mbf.input.dvi     \
  ${DOC}/f04mcf.input.dvi      ${DOC}/f04qaf.input.dvi     \
  ${DOC}/f07adf.input.dvi      ${DOC}/f07aef.input.dvi     \
  ${DOC}/f07fdf.input.dvi      ${DOC}/f07fef.input.dvi     \
  ${DOC}/farray.input.dvi      ${DOC}/ffdemo.input.dvi     \
  ${DOC}/fferr.input.dvi       \
  ${DOC}/ffx72.input.dvi       ${DOC}/fib.input.dvi        \
  ${DOC}/file.input.dvi        ${DOC}/finite.input.dvi     \
  ${DOC}/fixed.input.dvi      \
  ${DOC}/float1.input.dvi      ${DOC}/float2.input.dvi     \
  ${DOC}/float.input.dvi       ${DOC}/fname1.input.dvi     \
  ${DOC}/fname.input.dvi       ${DOC}/fnla.input.dvi       \
  ${DOC}/fns.input.dvi         ${DOC}/folium.input.dvi     \
  ${DOC}/fparfrac.input.dvi    ${DOC}/fparfrc.input.dvi    \
  ${DOC}/fr1.input.dvi         ${DOC}/fr2.input.dvi        \
  ${DOC}/frac.input.dvi        ${DOC}/fr.input.dvi         \
  ${DOC}/function.input.dvi    ${DOC}/galois.input.dvi     \
  ${DOC}/gary1.input.dvi       ${DOC}/gbf.input.dvi        \
  ${DOC}/genups.input.dvi      ${DOC}/gnarly1.input.dvi    \
  ${DOC}/gonshor.input.dvi     ${DOC}/graphics.input.dvi   \
  ${DOC}/grdef.input.dvi       ${DOC}/grpthry.input.dvi    \
  ${DOC}/gstbl.input.dvi       ${DOC}/heap.input.dvi       \
  ${DOC}/heat.input.dvi        ${DOC}/helix.input.dvi      \
  ${DOC}/help.input.dvi        \
  ${DOC}/hexadec.input.dvi     ${DOC}/hilbert.as.dvi       \
  ${DOC}/huang.input.dvi       ${DOC}/ico.input.dvi        \
  ${DOC}/ideal.input.dvi       ${DOC}/ifact.input.dvi      \
  ${DOC}/images1a.input.dvi    ${DOC}/images1.input.dvi    \
  ${DOC}/images2a.input.dvi    ${DOC}/images2.input.dvi    \
  ${DOC}/images3a.input.dvi    ${DOC}/images3.input.dvi    \
  ${DOC}/images5a.input.dvi    ${DOC}/images5.input.dvi    \
  ${DOC}/images6a.input.dvi    ${DOC}/images6.input.dvi    \
  ${DOC}/images7a.input.dvi    ${DOC}/images7.input.dvi    \
  ${DOC}/images8a.input.dvi    ${DOC}/images8.input.dvi    \
  ${DOC}/infprod.input.dvi     ${DOC}/intaf.input.dvi      \
  ${DOC}/intdeq.input.dvi      ${DOC}/intef2.input.dvi     \
  ${DOC}/intef.input.dvi       ${DOC}/intg0.input.dvi      \
  ${DOC}/intheory.input.dvi    ${DOC}/int.input.dvi        \
  ${DOC}/intlf.input.dvi       ${DOC}/intmix2.input.dvi    \
  ${DOC}/intmix.input.dvi      ${DOC}/intrf.input.dvi      \
  ${DOC}/ipftest.input.dvi     ${DOC}/is.input.dvi         \
  ${DOC}/isprime.input.dvi     ${DOC}/kafile.input.dvi     \
  ${DOC}/kernel.input.dvi      ${DOC}/knot2.input.dvi      \
  ${DOC}/knot.input.dvi        ${DOC}/knownbugs.input.dvi  \
  ${DOC}/kovacic.input.dvi     ${DOC}/kuipers.input.dvi    \
  ${DOC}/laplace.input.dvi     ${DOC}/leg.input.dvi        \
  ${DOC}/lexp.input.dvi        \
  ${DOC}/lib.input.dvi         ${DOC}/limit.input.dvi      \
  ${DOC}/linalg.input.dvi      ${DOC}/lindep.input.dvi     \
  ${DOC}/liss1.input.dvi       ${DOC}/liss2.input.dvi      \
  ${DOC}/list.input.dvi        ${DOC}/lode.input.dvi       \
  ${DOC}/lodesys.input.dvi     ${DOC}/lodo1.input.dvi      \
  ${DOC}/lodo2.input.dvi       ${DOC}/lodo3.input.dvi      \
  ${DOC}/lodof.input.dvi       ${DOC}/lodo.input.dvi       \
  ${DOC}/loop.input.dvi        ${DOC}/lpoly.input.dvi      \
  ${DOC}/lump.input.dvi        ${DOC}/lupfact.input.dvi    \
  ${DOC}/lword.input.dvi       ${DOC}/macbug.input.dvi     \
  ${DOC}/macros.input.dvi      ${DOC}/magma.input.dvi      \
  ${DOC}/mantepse.input.dvi \
  ${DOC}/mapleok.input.dvi     ${DOC}/mappkg1.input.dvi    \
  ${DOC}/marcbench.input.dvi   ${DOC}/matbug.input.dvi     \
  ${DOC}/matops.as.dvi         ${DOC}/matrix1.input.dvi    \
  ${DOC}/matrix22.input.dvi    ${DOC}/matrix.input.dvi     \
  ${DOC}/matrox.input.dvi      ${DOC}/mfinfact.input.dvi   \
  ${DOC}/mkfunc.input.dvi      ${DOC}/mountain.input.dvi   \
  ${DOC}/mpoly.input.dvi       ${DOC}/mset2.input.dvi      \
  ${DOC}/mset.input.dvi        ${DOC}/mult2d.input.dvi     \
  ${DOC}/mult3d.input.dvi      ${DOC}/multfact.input.dvi   \
  ${DOC}/multiple.input.dvi    ${DOC}/multKnot.input.dvi   \
  ${DOC}/negfloats.input.dvi  \
  ${DOC}/newton.input.dvi      ${DOC}/nlode.input.dvi      \
  ${DOC}/none.input.dvi        ${DOC}/noonburg.input.dvi   \
  ${DOC}/ntube.input.dvi      \
  ${DOC}/numbers.input.dvi     ${DOC}/oct.input.dvi        \
  ${DOC}/octonion.input.dvi    ${DOC}/ode.input.dvi        \
  ${DOC}/odpol.input.dvi       ${DOC}/op1.input.dvi        \
  ${DOC}/opalg.input.dvi       ${DOC}/operator.input.dvi   \
  ${DOC}/op.input.dvi          ${DOC}/ovar.input.dvi       \
  ${DOC}/padic.input.dvi       ${DOC}/palette.input.dvi    \
  ${DOC}/parabola.input.dvi    ${DOC}/parpcurv.input.dvi   \
  ${DOC}/parscurv.input.dvi    ${DOC}/parsurf.input.dvi    \
  ${DOC}/pascal1.input.dvi     ${DOC}/pascal.input.dvi     \
  ${DOC}/pat.input.dvi         ${DOC}/patmatch.input.dvi   \
  ${DOC}/pdecomp0.as.dvi       ${DOC}/perman.input.dvi     \
  ${DOC}/perm.input.dvi        ${DOC}/pfr1.input.dvi       \
  ${DOC}/pfr.input.dvi         ${DOC}/pinch.input.dvi      \
  ${DOC}/plotfile.input.dvi    ${DOC}/plotlist.input.dvi   \
  ${DOC}/pollevel.input.dvi    ${DOC}/poly1.input.dvi      \
  ${DOC}/polycoer.input.dvi    ${DOC}/poly.input.dvi       \
  ${DOC}/psgenfcn.input.dvi    ${DOC}/quat1.input.dvi      \
  ${DOC}/quat.input.dvi        ${DOC}/r20abugs.input.dvi   \
  ${DOC}/r20bugs.input.dvi     ${DOC}/r21bugsbig.input.dvi \
  ${DOC}/r21bugs.input.dvi     ${DOC}/radff.input.dvi      \
  ${DOC}/radix.input.dvi       \
  ${DOC}/reclos.input.dvi      ${DOC}/reductio.input.dvi   \
  ${DOC}/repa6.input.dvi      \
  ${DOC}/ribbon.input.dvi      ${DOC}/ribbons.input.dvi    \
  ${DOC}/ribbonsNew.input.dvi  ${DOC}/rk4draw.input.dvi    \
  ${DOC}/robidoux.input.dvi    ${DOC}/roman.input.dvi      \
  ${DOC}/romnum.as.dvi         ${DOC}/roots.input.dvi      \
  ${DOC}/ruleset.input.dvi     ${DOC}/rules.input.dvi      \
  ${DOC}/s01eaf.input.dvi      ${DOC}/s13aaf.input.dvi     \
  ${DOC}/s13acf.input.dvi      ${DOC}/s13adf.input.dvi     \
  ${DOC}/s14aaf.input.dvi      ${DOC}/s14abf.input.dvi     \
  ${DOC}/s14baf.input.dvi      ${DOC}/s15adf.input.dvi     \
  ${DOC}/s15aef.input.dvi      ${DOC}/s17acf.input.dvi     \
  ${DOC}/s17adf.input.dvi      ${DOC}/s17aef.input.dvi     \
  ${DOC}/s17aff.input.dvi      ${DOC}/s17agf.input.dvi     \
  ${DOC}/s17ahf.input.dvi      ${DOC}/s17ajf.input.dvi     \
  ${DOC}/s17akf.input.dvi      ${DOC}/s17dcf.input.dvi     \
  ${DOC}/s17def.input.dvi      ${DOC}/s17dgf.input.dvi     \
  ${DOC}/s17dhf.input.dvi      ${DOC}/s17dlf.input.dvi     \
  ${DOC}/s18acf.input.dvi      ${DOC}/s18adf.input.dvi     \
  ${DOC}/s18aef.input.dvi      ${DOC}/s18aff.input.dvi     \
  ${DOC}/s18dcf.input.dvi      ${DOC}/s18def.input.dvi     \
  ${DOC}/s19aaf.input.dvi      ${DOC}/s19abf.input.dvi     \
  ${DOC}/s19acf.input.dvi      ${DOC}/s19adf.input.dvi     \
  ${DOC}/s20acf.input.dvi      ${DOC}/s20adf.input.dvi     \
  ${DOC}/s21baf.input.dvi      ${DOC}/s21bbf.input.dvi     \
  ${DOC}/s21bcf.input.dvi      ${DOC}/s21bdf.input.dvi     \
  ${DOC}/saddle.input.dvi      ${DOC}/scherk.input.dvi     \
  ${DOC}/scope.input.dvi       ${DOC}/segbind.input.dvi    \
  ${DOC}/seg.input.dvi         ${DOC}/series2.input.dvi    \
  ${DOC}/series.input.dvi      ${DOC}/sersolve.input.dvi   \
  ${DOC}/set.input.dvi         ${DOC}/sinCosEx.input.dvi   \
  ${DOC}/sininv.input.dvi      ${DOC}/sinsin2.input.dvi    \
  ${DOC}/sinsin.input.dvi      ${DOC}/sint.input.dvi       \
  ${DOC}/skew.input.dvi        ${DOC}/slowint.input.dvi    \
  ${DOC}/solvetra.input.dvi    ${DOC}/space3.input.dvi     \
  ${DOC}/spadprof.input.dvi    ${DOC}/spiral.input.dvi     \
  ${DOC}/sqmatrix.input.dvi    ${DOC}/sregset.input.dvi    \
  ${DOC}/stbl.input.dvi        ${DOC}/stream2.input.dvi    \
  ${DOC}/stream.input.dvi      ${DOC}/streams.input.dvi    \
  ${DOC}/string.input.dvi      ${DOC}/strtbl.input.dvi     \
  ${DOC}/symbol.input.dvi      ${DOC}/synonym2.input.dvi   \
  ${DOC}/synonym.input.dvi     ${DOC}/t111293.input.dvi    \
  ${DOC}/table.input.dvi       ${DOC}/tanatan.input.dvi    \
  ${DOC}/tensor.input.dvi      \
  ${DOC}/test.input.dvi        ${DOC}/tetra.input.dvi      \
  ${DOC}/textfile.input.dvi    ${DOC}/tknot.input.dvi      \
  ${DOC}/torus.input.dvi       ${DOC}/tree.input.dvi       \
  ${DOC}/triglim.input.dvi     ${DOC}/tschirn.input.dvi    \
  ${DOC}/tsetcatbutcher.input.dvi    \
  ${DOC}/tsetcatchemical.input.dvi   \
  ${DOC}/tsetcatvermeer.input.dvi    \
  ${DOC}/tutchap1.input.dvi    ${DOC}/tutchap2.input.dvi   \
  ${DOC}/tutchap3.input.dvi    ${DOC}/tutchap4.input.dvi   \
  ${DOC}/tutchap67.input.dvi   ${DOC}/typo.input.dvi       \
  ${DOC}/uniseg.input.dvi      ${DOC}/up.input.dvi         \
  ${DOC}/vector.input.dvi      ${DOC}/vectors.input.dvi    \
  ${DOC}/viewdef.input.dvi     ${DOC}/void.input.dvi       \
  ${DOC}/wester.input.dvi      ${DOC}/wiggle.input.dvi     \
  ${DOC}/wutset.input.dvi      ${DOC}/xpbwpoly.input.dvi   \
  ${DOC}/xpoly.input.dvi       ${DOC}/xpr.input.dvi        \
  ${DOC}/zdsolve.input.dvi     ${DOC}/zimmer.input.dvi     \
  ${DOC}/zlindep.input.dvi  


.PHONY: all all-ax all-input

all: all-ax

all-ax all-input: $(OUT) ${FILES} ${FILES2} regress
	@echo 1 finished $(srcdir)

$(OUT):
	$(mkinstalldirs) $@


${OUT}/%.input: %.input
	@ echo generic 10 making ${OUT}/$*.input from $*.input
	cp $*.input ${OUT}/$*.input

%.spad: ${IN}/%.spad
	cp $< $@

.PRECIOUS: %.input

%.input: ${IN}/%.input.pamphlet
	@ echo generic 11 making $*.input from ${IN}/$*.input.pamphlet
	${TANGLE} ${IN}/$*.input.pamphlet > $*.input

${OUT}/%.as: %.as
	@echo generic 12 making ${OUT}/$*.as from $*.as
	cp $*.as ${OUT}/$*.as

%.as: ${IN}/%.as.pamphlet
	@echo generic 13 making $*.as from ${IN}/$*.as.pamphlet
	${TANGLE} ${IN}/$*.as.pamphlet >$*.as

${DOC}/%.input.dvi: ${IN}/%.input.pamphlet ${DOC}/axiom.sty
	@ echo generic 14 making ${DOC}/$*.input.dvi from ${IN}/$*.input.pamphlet
	@ (cd ${DOC} ; \
	cp ${IN}/$*.input.pamphlet ${DOC} ; \
	${DOCUMENT} $*.input ; \
	rm -f ${DOC}/$*.input.pamphlet ; \
	rm -f ${DOC}/$*.input.tex ; \
	rm -f ${DOC}/$*.input )

${DOC}/%.as.dvi: ${IN}/%.as.pamphlet ${DOC}/axiom.sty
	@ echo generic 14 making ${DOC}/$*.as.dvi from ${IN}/$*.as.pamphlet
	@ (cd ${DOC} ; \
	cp ${IN}/$*.as.pamphlet ${DOC} ; \
	${DOCUMENT} $*.as ; \
	rm -f ${DOC}/$*.as.pamphlet ; \
	rm -f ${DOC}/$*.as.tex ; \
	rm -f ${DOC}/$*.as )


use:
	@echo 2 making ${OUT} from ${IN}

regress: bugs2008-ExportType.spad
	${MAKE} DAASE=$(axiom_targetdir) regression-tests

bug:
	@echo 4 making ${OUT} from ${IN}

document:
	@echo 5 documenting ${OUT}

mostlyclean-local:
	-rm -f *.output
	-rm -rf $(OUT)

clean-local: mostlyclean-local

distclean-local: clean-local


.SUFFIXES:
.SUFFIXES: .input .output
 
TESTSYS=$(axiom_target_bindir)/AXIOMsys
 
SKIP= antoine.output as-eg1.output as-eg2.output    \
      as-eg3.output    as-eg4.output    as-eg5.output    as-eg6.output    \
      atansqrt.output  bern.output      bernpoly.output  bouquet.output   \
      c02aff.output    \
      c02agf.output    c05adf.output    c05nbf.output    c05pbf.output    \
      c06eaf.output    c06ebf.output    c06ecf.output    c06ekf.output    \
      c06fpf.output    c06fqf.output    c06frf.output    c06fuf.output    \
      c06gbf.output    c06gcf.output    c06gqf.output    c06gsf.output    \
      cdraw.output     color.output     cone.output      \
      conformal.output coordsys.output  \
      cycloid2.output  cycloid3.output  cycloid.output   \
      d01ajf.output    d01akf.output    d01alf.output    d01amf.output    \
      d01anf.output    d01apf.output    d01aqf.output    d01asf.output    \
      d01bbf.output    d01fcf.output    d01gaf.output    d01gbf.output    \
      d02bbf.output    d02bhf.output    d02cjf.output    d02ejf.output    \
      d02gaf.output    d02gbf.output    d02kef.output    d02raf.output    \
      d03edf.output    d03eef.output    d03faf.output    damped.output    \
      de2re.output     defs.output      \
      draw2dSF.output  drawalg.output   drawcfn.output   drawcfun.output  \
      drawcurv.output  drawcx.output    drawex.output    draw.output      \
      drawpoly.output  drawx.output     dropt.output     e01baf.output    \
      e01bef.output    e01bff.output    e01bgf.output    e01bhf.output    \
      e01daf.output    e01saf.output    e01sbf.output    e01sef.output    \
      e01sff.output    e02adf.output    e02aef.output    e02agf.output    \
      e02ahf.output    e02ajf.output    e02akf.output    e02baf.output    \
      e02bbf.output    e02bcf.output    e02bdf.output    e02bef.output    \
      e02daf.output    e02dcf.output    e02ddf.output    e02def.output    \
      e02dff.output    e02gaf.output    e02zaf.output    e04dgf.output    \
      e04fdf.output    e04gcf.output    e04jaf.output    e04mbf.output    \
      e04naf.output    e04ucf.output    e04ycf.output    egg.output       \
      explot2d.output  explot3d.output  \
      f01brf.output    f01bsf.output    f01maf.output    \
      f01mcf.output    f01qcf.output    f01qdf.output    f01qef.output    \
      f01rcf.output    f01rdf.output    f01ref.output    f02aaf.output    \
      f02abf.output    f02adf.output    f02aef.output    f02aff.output    \
      f02agf.output    f02ajf.output    f02akf.output    f02awf.output    \
      f02axf.output    f02bbf.output    f02bjf.output    f02fjf.output    \
      f02wef.output    f02xef.output    f04adf.output    f04arf.output    \
      f04asf.output    f04atf.output    f04axf.output    f04faf.output    \
      f04jgf.output    f04maf.output    f04mbf.output    f04mcf.output    \
      f04qaf.output    f07adf.output    f07aef.output    f07fdf.output    \
      f07fef.output    folium.output    gary1.output     gnarly1.output   \
      graphics.output  grdef.output     helix.output     \
      images1a.output  images1.output   images2a.output  images2.output   \
      images3a.output  images3.output   images5a.output  images5.output   \
      images6a.output  images6.output   images7a.output  images7.output   \
      images8a.output  images8.output   knot.output      knownbugs.output \
      liss1.output     liss2.output     lump.output      matrox.output    \
      mountain.output  mult2d.output    mult3d.output    multKnot.output  \
      ntube.output     palette.output   parpcurv.output  parscurv.output  \
      parsurf.output   pinch.output     plotfile.output  \
      plotlist.output  pollevel.output  ribbon.output    \
      ribbons.output   rk4draw.output  \
      s01eaf.output    s13aaf.output    s13acf.output    s13adf.output    \
      s14aaf.output    s14abf.output    s14baf.output    s15adf.output    \
      s15aef.output    s17acf.output    s17adf.output    s17aef.output    \
      s17aff.output    s17agf.output    s17ahf.output    s17ajf.output    \
      s17akf.output    s17dcf.output    s17def.output    s17dgf.output    \
      s17dhf.output    s17dlf.output    s18acf.output    s18adf.output    \
      s18aef.output    s18aff.output    s18dcf.output    s18def.output    \
      s19aaf.output    s19abf.output    s19acf.output    s19adf.output    \
      s20acf.output    s20adf.output    s21baf.output    s21bbf.output    \
      s21bcf.output    s21bdf.output    saddle.output    \
      sininv.output    sinsin2.output   sinsin.output    spiral.output    \
      tetra.output     tknot.output     tschirn.output   typo.output      \
      vectors.output   wester.output    wiggle.output    zimmer.output    

# Error: The function WRAPPED is undefined.
WRAPPED=loop.output      

# Broken at |MODOP;ELT;$2M;6|.  Type :H for Help.
MODOP=function.output  

# Broken at |MATCAT-;*;3S;29|.  Type :H for Help.
MATCAT=linalg.output    

# Broken at |STAGG-;ELT;AIS;5|.  Type :H for Help.
STAGG=reductio.output

OUTS= algaggr.output   algbrbf.output   algfacob.output  \
      allfact.output   arith.output     \
      arrows.output    \
      assign.output    bags.output      \
      bugs.output      bug10069.output  bug10312.output \
      bug6357.output   bug9057.output   bugs2007.output \
      bugs2008.output  bugs2009.output  bugs2010.output \
      bugs2011.output  \
      calculus2.output cardinal.output  \
      ch.output        clifford.output  coercels.output  \
      collect.output   constant.output  contfrac.output  \
      curl.output      \
      cycles.output    \
      cyfactor.output  \
      danzwill.output  defintef.output  defintrf.output  \
      dhtri.output     \
      dirichlet.output divisor.output   dpol.output      \
      efi.output       eigen.output     elemfun.output   \
      elemnum.output   elfuts.output    ellip.output \
      elt.output       \
      equation2.output equation.output  errortrap.output \
      eval.output      exlap.output     \
      exint.output     \
      expexpan.output  explim.output    \
      exprode.output   exprpoly.output  \
      exsum.output     ffdemo.output    fferr.output     \
      ffx72.output     fib.output       finite.output    \
      fixed.output \
      float2.output    float.output     \
      fname.output     fnla.output      fns.output       \
      fparfrac.output  \
      fr.output        \
      galois.output    genups.output    \
      gonshor.output   \
      grpthry.output   heat.output      \
      help.output      \
      huang.output     \
      i-bugs2007.output i-bugs2008.output i-bugs2009.output \
      i-bugs2010.output \
      ico.output       ideal.output     ifact.output     \
      infprod.output    \
      intaf.output     intef.output     intdeq.output    \
      intg0.output     intlf.output     \
      intmix.output    intrf.output     ipftest.output   \
      is.output        \
      isprime.output   knot2.output     \
      kovacic.output   kuipers.output   laplace.output   \
      leg.output       \
      limit.output     \
      lindep.output    \
      lode.output      lodesys.output   \
      lodo.output      \
      lodof.output     \
      lupfact.output   macbug.output    macros.output    \
      mantepse.output  mapleok.output   \
      marcbench.output matbug.output    \
      matrix22.output  matrix.output    \
      mfinfact.output  \
      mset.output      \
      multfact.output  multiple.output  negfloats.output \
      newton.output    nlode.output     \
      noonburg.output  \
      numbers.output   ode.output       \
      octonion.output  \
      op.output        opalg.output     operator.output  \
      padic.output     parabola.output  \
      pascal1.output   pascal.output    \
      pat.output       patmatch.output  perm.output      \
      pfr.output       pmint.output     psgenfcn.output  \
      polycoer.output  \
      poly.output      \
      radff.output     reclos.output    \
      repa6.output     \
      robidoux.output  \
      roots.output     ruleset.output   rules.output     \
      r20abugs.output  r20bugs.output   r21bugsbig.output r21bugs.output  \
      scherk.output    \
      scope.output     \
      series2.output   series.output     sersolve.output  \
      sinCosEx.output  \
      skew.output      slowint.output   solvetra.output  \
      space3.output    spadprof.output  \
      streams.output   stream2.output   \
      synonym2.output  \
      synonym.output   t111293.output   tanatan.output   \
      tensor.output test.output      triglim.output   \
      tsetcatbutcher.output tsetcatchemical.output tsetcatvermeer.output  \
      torus.output     tree.output      \
      tutchap1.output  tutchap2.output  tutchap3.output  tutchap4.output  \
      tutchap67.output \
      unittest.output \
      viewdef.output   vsbasis.output \
      zimmer.output 

# new algebra tests based on documentation
ALGEBRA=INTHEORY.output VIEW2D.output TESTFR.output TEST-MATCAT.output \
        TEST-MTS.output TEST-POLYLIFT.output TEST-TABLE.output TEST-SSOLVE.output

.PHONY: regression-tests
regression-tests: ${OUTS} ${ALGEBRA}
	@ echo 1 finished input
 
%.output: %.input
	( \
	echo running test file $* ; \
	echo ')set message test on' > tmp$$$$.input; \
	echo ')set message auto off' >> tmp$$$$.input ; \
	echo 'systemCommand "read $*"' >> tmp$$$$.input ; \
	echo ')lisp (quit)' >> tmp$$$$.input ; \
	echo ')read "tmp'$$$$'.input"' | ${TESTSYS} | tee $*.output; \
	rm tmp$$$$.input )


