# $Id: makefile,v 1.2 2010/12/06 21:51:09 garyblock Exp $ catalog : testharncatalog include ${ESMF_DIR}/makefile # # to generate catalog document enter: gmake catalog from within an single node mpi environment # e.g. "qsub -I go.sh", where go.sh allocates single mpi node # # since the xml files are generated by the test harness and the test harness requires mpi, # it must be built using mpirun # NP = 16 CLEANDIRS = CLEANFILES = CLOBBERDIRS = # test harness resource directories ARRAY_DIR = $(ESMF_DIR)/src/Infrastructure/Array/tests/harness_config FIELD_DIR = $(ESMF_DIR)/src/Infrastructure/Field/tests/harness_config # test harness catalog generator directories TH_SRCDIR = $(ESMF_DIR)/src/test_harness/catalog #TH_WORKDIR = $(ESMF_DIR)/src/test_harness/catalog/work TH_WORKDIR = $(ESMF_TESTDIR)/work TH_DOCDIR = $(ESMF_DIR)/src/test_harness/catalog ############################################################ # copy resources to work dir load_res : echo "Loading resources" cp -f $(ARRAY_DIR)/*.rc $(TH_WORKDIR) cp -f $(FIELD_DIR)/*.rc $(TH_WORKDIR) ############################################################ ############################################################ array_list = array_default array_1 array_2 ############################################################ # array_default array_default: $(ESMF_MPIRUN) -np $(NP) ESMF_TestHarnessUTest -case $@_test.rc -xml $@.xml -norun tcasexml2tex HarnessTex.xslt $@.xml $@.tex bodyA.tex tcasexml2tex HarnessTexSummary.xslt $@.xml $@S.tex bodyAS.tex ############################################################ # array_1 array_1: $(ESMF_MPIRUN) -np $(NP) ESMF_TestHarnessUTest -case $@_test.rc -xml $@.xml -norun tcasexml2tex HarnessTex.xslt $@.xml $@.tex bodyA.tex tcasexml2tex HarnessTexSummary.xslt $@.xml $@S.tex bodyAS.tex ############################################################ # array_2 array_2: $(ESMF_MPIRUN) -np $(NP) ESMF_TestHarnessUTest -case $@_test.rc -xml $@.xml -norun tcasexml2tex HarnessTex.xslt $@.xml $@.tex bodyA.tex tcasexml2tex HarnessTexSummary.xslt $@.xml $@S.tex bodyAS.tex ############################################################ ############################################################ field_list = field_default field_1 ############################################################ # field_default field_default: $(ESMF_MPIRUN) -np $(NP) ESMF_TestHarnessUTest -case $@_test.rc -xml $@.xml -norun tcasexml2tex HarnessTex.xslt $@.xml $@.tex bodyF.tex tcasexml2tex HarnessTexSummary.xslt $@.xml $@S.tex bodyFS.tex # field_1 field_1: $(ESMF_MPIRUN) -np $(NP) ESMF_TestHarnessUTest -case $@_test.rc -xml $@.xml -norun tcasexml2tex HarnessTex.xslt $@.xml $@.tex bodyF.tex tcasexml2tex HarnessTexSummary.xslt $@.xml $@S.tex bodyFS.tex ############################################################ # generate pdf files testharncatalog.pdf : $(array_list) $(field_list) latex testharncatalog pdflatex -interaction batchmode testharncatalog cp testharncatalog.pdf $(TH_DOCDIR) # first latex genrrates TOC #cat testharncat2.tex $^.tex > body.tex #cat testharncat1.tex $^S.tex > bodyS.tex #pdflatex -interaction batchmode testharncatalog ############################################################ testharncatalog: init_work_dir load_res echo "making testharness catalog" -@cd $(TH_WORKDIR) ; \ gmake -f $(TH_SRCDIR)/makefile testharncatalog.pdf >testharncatalog.stdout ############################################################ init_work_dir: if [ ! -d $(TH_WORKDIR) ] ; then \ echo Making directory $(TH_WORKDIR) for test harness catalog genration; \ mkdir -p $(TH_WORKDIR) ; fi ; \ rm -f $(TH_WORKDIR)/* ; \ echo "loading commands" ; \ cp $(ESMF_TESTDIR)/ESMF_TestHarnessUTest $(TH_WORKDIR) ; \ cp $(ESMF_TESTDIR)/ESMC_TestHarnessLatexPPUTest $(TH_WORKDIR) ; \ cp $(TH_SRCDIR)/tcasexml2tex $(TH_WORKDIR) ; \ echo "Loading templates" ; \ cp -f $(TH_SRCDIR)/*.xslt $(TH_WORKDIR) ; \ cp -f $(TH_SRCDIR)/testharncatalog.tex $(TH_WORKDIR) ; \ cp -f $(TH_SRCDIR)/testharnarrayS.tex $(TH_WORKDIR)/bodyAS.tex ; \ cp -f $(TH_SRCDIR)/testharnarray.tex $(TH_WORKDIR)/bodyA.tex ; \ cp -f $(TH_SRCDIR)/testharnfieldS.tex $(TH_WORKDIR)/bodyFS.tex ; \ cp -f $(TH_SRCDIR)/testharnfield.tex $(TH_WORKDIR)/bodyF.tex chmod 644 $(TH_WORKDIR)/body* ############################################################