# Makefile.am for ropp_apps/tests # =============================== # 1. Useful settings # ------------------ SUFFIXES = .sh .pl # 2. The test programs # -------------------- if HAVE_ROPP_IO noinst_PROGRAMS = ropp_apps_summary ropp_apps_compare ropp_apps_summary_SOURCES = ropp_apps_summary.f90 ropp_apps_compare_SOURCES = ropp_apps_compare.f90 endif # 3. Scripts for testing # ---------------------- noinst_SCRIPTS = test_apps_tph.sh test_apps_pblh.sh # 5. Libraries to link in # ----------------------- LDADD = ../build/libropp_apps.a # 6. Files to be cleaned # ---------------------- CLEANFILES = *.stb $(MODULES) DISTCLEANFILES = *.cdl *.nc # 7. Stuff to go into the distribution # ------------------------------------ EXTRA_DIST = test_apps_tph.sh test_apps_pblh.sh # 8. Compilation rules for scripts # --------------------------------- editsh = sed \ -e 's,@''etcdir''@,$(etcdir),g' \ -e 's,@''datadir''@,$(datadir),g' \ -e 's,@''pkgdatadir''@,$(pkgdatadir),g' \ -e 's,@''defaultcenter''@,$(defaultcenter),g' \ -e 's,@''M4''@,$(M4),g' \ -e 's,@''AWK''@,$(AWK),g' \ -e 's,@''SHELL''@,$(SHELL),g' \ -e 's,@''VERSION''@,$(VERSION),g' \ -e 's,@''PACKAGE''@,$(PACKAGE),g' editpl = sed \ -e 's,@''etcdir''@,$(etcdir),g' \ -e 's,@''datadir''@,$(datadir),g' \ -e 's,@''pkgdatadir''@,$(pkgdatadir),g' \ -e 's,@''perldir''@,$(perldir),g' \ -e 's,@''defaultcenter''@,$(defaultcenter),g' \ -e 's,@''PERL''@,$(PERL),g' \ -e 's,@''VERSION''@,$(VERSION),g' \ -e 's,@''PACKAGE''@,$(PACKAGE),g' .sh: rm -f $@ $@.tmp $(editsh) $< >$@.tmp chmod +x $@.tmp mv $@.tmp $@ .pl: rm -f $@ $@.tmp $(editpl) $< >$@.tmp chmod +x $@.tmp mv $@.tmp $@ # 9. Dependencies # --------------- ropp_apps_summary.$(OBJEXT) : ropp_apps_summary.f90 ropp_apps_compare.$(OBJEXT) : ropp_apps_compare.f90 # 10. Additional things to do # --------------------------- test: test_apps if HAVE_ROPP_IO test_apps: @ rm -f ./compare.txt @ echo "" @ echo "Testing ROPP PP TPH tool..." @ echo "" @ ./test_apps_tph.sh @ echo "" @ echo "Testing ROPP PP PBLH tool..." @ echo "" @ ./test_apps_pblh.sh @ echo "" @ echo "Making summary of test result" @ echo "" @ ./ropp_apps_summary @ echo "" @ cat ropp_apps_summary.txt @ echo "" @ echo "This table is saved in ropp_apps_summary.txt." @ echo "Each test has its own log file." @ echo "" else test_apps: @ echo "" @ echo "*********** ROPP_APPS TESTING ***********************" @ echo "" @ echo "Configure detects that the ROPP_IO library has not been correctly installed." @ echo "The ropp_apps test routine requires ropp_io and netcdf to be installed first. " @ echo "See ROPP release notes for installation instructions." @ echo "" @ echo "NOTE: " @ echo " ROPP_IO AND NETCDF LIBRARIES ARE ONLY REQUIRED FOR STAND-ALONE" @ echo " ROPP_APPS TOOLS AND TEST ROUTINES. USERS WISHING TO LINK ROPP_APPS TO " @ echo " THEIR OWN APPLICATIONS NOT REQUIRING INPUT/OUTPUT FUNCTIONS DO" @ echo " NOT NEED TO INSTALL THESE ADDITIONAL LIBRARIES OTHER THAN TO RUN " @ echo " STAND-ALONE TOOLS AND TESTING. See ROPP User Guide for more details." @ echo "" endif