From e7a398d07453e24eee5681d73e0d6bcfb40af6c7 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Apr 2007 16:31:10 -0500 Subject: [svn-r13646] Fortran/examples/testh5fc.sh.in: Most fortran compilers do not support the Preprocessing -E option. Removed the tests for preprocessing only. examples/testh5cc.sh.in: c++/examples/testh5c++.sh.in: Updated comments and some cosmetic rearrangement. No substance changes. Tested platform: Copper, kagiso. --- c++/examples/testh5c++.sh.in | 15 ++++++++------- examples/testh5cc.sh.in | 19 ++++++++++++------- fortran/examples/testh5fc.sh.in | 36 ++++++++---------------------------- 3 files changed, 28 insertions(+), 42 deletions(-) diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in index 3eb2bcd..0fa7486 100755 --- a/c++/examples/testh5c++.sh.in +++ b/c++/examples/testh5c++.sh.in @@ -43,19 +43,20 @@ if test -z "$srcdir"; then fi # Generate some source files and library for tests. -hdf5main=${H5TOOL}_hdf5main.cpp +suffix=cpp # source file suffix +hdf5main=${H5TOOL}_hdf5main.$suffix hdf5main_o=${H5TOOL}_hdf5main.o -appmain=${H5TOOL}_appmain.cpp +appmain=${H5TOOL}_appmain.$suffix appmain_o=${H5TOOL}_appmain.o -prog1=${H5TOOL}_prog1.cpp +prog1=${H5TOOL}_prog1.$suffix prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.cpp +prog2=${H5TOOL}_prog2.$suffix prog2_o=${H5TOOL}_prog2.o applib=libapp${H5TOOL}.a # short hands temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e 's/\.cpp/.o/g'` +temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` temp_FILES="a.out *.h5 $applib" # Generate appmain: @@ -251,8 +252,8 @@ else TOOLTEST -o a.out $applib fi -# Just cpp, no compile, no link. -echo "***"Just cpp, no compile, no link. +# Just preprocess, no compile, no link. +echo "***"Just preprocess, no compile, no link. TOOLTEST -E $hdf5main TOOLTEST -E $appmain $prog1 $prog2 diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in index 9a2c14d..68358a3 100755 --- a/examples/testh5cc.sh.in +++ b/examples/testh5cc.sh.in @@ -38,25 +38,30 @@ DIFF='diff -c' nerrors=0 verbose=yes +# setup my machine information. +myos=`uname -s` +myhostnama=`uname -n` + # The build (current) directory might be different than the source directory. if test -z "$srcdir"; then srcdir=. fi # Generate some source files and library for tests. -hdf5main=${H5TOOL}_hdf5main.c +suffix=c # source file suffix +hdf5main=${H5TOOL}_hdf5main.$suffix hdf5main_o=${H5TOOL}_hdf5main.o -appmain=${H5TOOL}_appmain.c +appmain=${H5TOOL}_appmain.$suffix appmain_o=${H5TOOL}_appmain.o -prog1=${H5TOOL}_prog1.c +prog1=${H5TOOL}_prog1.$suffix prog1_o=${H5TOOL}_prog1.o -prog2=${H5TOOL}_prog2.c +prog2=${H5TOOL}_prog2.$suffix prog2_o=${H5TOOL}_prog2.o applib=libapp${H5TOOL}.a # short hands temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e 's/\.c/.o/g'` +temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` temp_FILES="a.out *.h5 $applib" # Generate appmain: @@ -207,8 +212,8 @@ $RANLIB $applib TOOLTEST $appmain $applib TOOLTEST $appmain_o $applib -# Just cpp, no compile, no link. -echo "***"Just cpp, no compile, no link. +# Just preprocess, no compile, no link. +echo "***"Just preprocess, no compile, no link. TOOLTEST -E $hdf5main TOOLTEST -E $appmain $prog1 $prog2 diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in index b16c2e9..1a4bb8f 100755 --- a/fortran/examples/testh5fc.sh.in +++ b/fortran/examples/testh5fc.sh.in @@ -38,6 +38,10 @@ DIFF='diff -c' nerrors=0 verbose=yes +# setup my machine information. +myos=`uname -s` +myhostnama=`uname -n` + # The build (current) directory might be different than the source directory. if test -z "$srcdir"; then srcdir=. @@ -57,7 +61,7 @@ applib=libapp${H5TOOL}.a # short hands temp_SRC="$hdf5main $appmain $prog1 $prog2" -temp_OBJ=`echo $temp_SRC | sed -e 's/${suffix}/.o/g'` +temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"` temp_FILES="a.out *.h5 $applib" # Generate appmain: @@ -138,29 +142,8 @@ DPRINT() { # Run a test and print PASS or *FAIL*. If a test fails then increment # the `nerrors' global variable and (if $verbose is set) display the -# difference between the actual output and the expected output. The -# expected output is given as the first argument to this function and -# the actual output file is calculated by replacing the `.ddl' with -# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a -# non-zero value. -# -# This test shows what commands will be run and verify they are as expected. -# It does not actually execute the compiler script to compile source code. -# The actual execution ability is tested somewhere else. -# -# Algorithm: -# First figure out the parameters (e.g., compiler name and option, linker name and -# options, libraries used, ....) that the h5cc command uses. Then use the -show to -# display what commands the tool will use for different parameter and verify if they -# are as expected. -# The paramters have two part, prefix and suffix. The prefix part is the real compiler -# or linker command name, options (-I, -D, ...). The suffix part is the link options, -# libraries, .... -# - -# -# $1: -C compile only; -L link only; -CL compile and link. -# $2-$: remainign arguments +# failed output. The actual output is not removed if $HDF5_NOCLEANUP is +# defined. # TOOLTEST() { out=test_$H5TOOL_$$.out @@ -218,10 +201,7 @@ $RANLIB $applib SKIP $appmain $applib SKIP $appmain_o $applib -# Just cpp, no compile, no link. -echo "***"Just cpp, no compile, no link. -TOOLTEST -E $hdf5main -TOOLTEST -E $appmain $prog1 $prog2 +# No preprocess test since -E is not a common option for Fortran compilers. ############################################################################## # END -- cgit v0.12