diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2005-01-18 23:53:34 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2005-01-18 23:53:34 (GMT) |
commit | d6c70331d748cefa9b048c7b87ea17c86e149834 (patch) | |
tree | 0c11547b59ac700ae05389f2b551cdb17d57b5f1 /c++/src | |
parent | f94c6a56ec3ff618480d2a3a891e5dc28366ffb1 (diff) | |
download | hdf5-d6c70331d748cefa9b048c7b87ea17c86e149834.zip hdf5-d6c70331d748cefa9b048c7b87ea17c86e149834.tar.gz hdf5-d6c70331d748cefa9b048c7b87ea17c86e149834.tar.bz2 |
[svn-r9834] Purpose: Bug fix
Description: h5c++ couldn't create object files
Solution: Brought changes from 1.6 to 1.7
Platforms tested: arabica
Misc. update:
Diffstat (limited to 'c++/src')
-rwxr-xr-x | c++/src/h5c++.in | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index e9e1b86..239fd41 100755 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -191,36 +191,38 @@ for arg in $@ ; do qarg='\"'"$arg"'\"' allargs="$allargs $qarg" ;; + *) allargs="$allargs $qarg" - if test -s "$arg"; then - ext=`expr "$arg" : '.*\(\..*\)'` - - if test "x$ext" = "x.c"; then - do_compile="yes" - compile_args="$compile_args $arg" - fname=`basename $arg .c` - link_objs="$link_objs $fname.o" - elif test "x$ext" = "x.o"; then - if test "x$dash_c" = "xyes"; then - compile_args="$compile_args $arg" - else - do_link="yes" - link_objs="$link_objs $arg" - fi - elif test "x$ext" = "x.a"; then - # This is an archive that we're linking in - libraries=" $libraries $arg " - else - compile_args="$compile_args $arg" - link_args="$link_args $arg" - fi - else - compile_args="$compile_args $arg" - link_args="$link_args $arg" - fi - ;; + if [ -s "$arg" ] ; then + ext=`expr "$arg" : '.*\(\..*\)'` + if [ "$ext" = ".C" -o "$ext" = ".cxx" -o "$ext" = ".cpp" -o \ + "$ext" = ".cc" -o "$ext" = ".c" -o "$ext" = ".CC" ] ; then + + do_compile="yes" + compile_args="$compile_args $arg" + fname=`basename $arg $ext` + link_objs="$link_objs $fname.o" + elif [ "$ext" = ".o" ] ; then + if test "x$dash_c" = "xyes" ; then + compile_args="$compile_args $arg" + else + do_link="yes" + link_objs="$link_objs $arg" + fi + elif test "x$ext" = "x.a"; then + # This is an archive that we're linking in + libraries=" $libraries $arg " + else + compile_args="$compile_args $arg" + link_args="$link_args $arg" + fi + else + compile_args="$compile_args $arg" + link_args="$link_args $arg" + fi + ;; esac done |