#!/bin/bash # Script to make the HDF5 libraries. # Exit Codes found in /usr/include/sysexits.h #set -x # Function to configure, make and then install the Package - contains Package Specific build configuration func_configure_make_install () { cd ${WORK_DIR} [ "${BUILD_TYPE}" == "debug" ] && CONFIGURE_DEBUG="--enable-build-mode=debug" # Added support for SHARED only library builds, as requested in RT#63875 CONFIGURE_FLAGS=${SHARED_LIB_CONFIGURE_FLAGS} if [ ! -e ALREADY_BUILT ] ; then ./configure --prefix=${OUTPUT_DIR} \ --enable-fortran \ --enable-cxx \ --without-zlib \ ${CONFIGURE_DEBUG} \ ${CONFIGURE_FLAGS} # Adding ACC_SET_GMAKE_JOBS to build as requested in RT#67548 ${GMAKE} -j ${ACC_SET_GMAKE_JOBS} ${GMAKE} install export RETVAL=$? fi if [ "${ARGUMENTS[1]}" == "-test" ] ; then echo -e "\nBuilding tests for `echo ${PACKAGE_VERSION}`...\n" ${GMAKE} check export RETVAL=$? fi if ( [ `uname` == "Darwin" ] && [ "${FC}" == "ifort" ] && [ "${RETVAL}" -eq 0 ] ) ; then ln -s /opt/intel/lib/* ${OUTPUT_DIR}/lib/ &> /dev/null 2>&1 ; fi if [ ! -L ${OUTPUT_DIR}/modules/hdf5.mod ] ; then cd ${OUTPUT_DIR}/modules/ ; ln -s ../include/h5*.mod . ; ln -s ../include/hdf5.mod . ; fi } # Function that contains Package Specific files and directories to be removed func_remove_package () { rm -f ${OUTPUT_DIR}/bin/h5* rm -f ${OUTPUT_DIR}/bin/gif2h5 rm -f ${OUTPUT_DIR}/lib/libhdf5* rm -f ${OUTPUT_DIR}/lib/libdynlib* rm -f ${OUTPUT_DIR}/modules/h5*.mod rm -f ${OUTPUT_DIR}/modules/hdf5.mod rm -f ${OUTPUT_DIR}/include/H5[Aa]*.h rm -f ${OUTPUT_DIR}/include/H5[Cc]*.h rm -f ${OUTPUT_DIR}/include/H5D*.h rm -f ${OUTPUT_DIR}/include/H5E*.h rm -f ${OUTPUT_DIR}/include/H5f*.h rm -f ${OUTPUT_DIR}/include/H5FD*.h rm -f ${OUTPUT_DIR}/include/H5Fa*.h rm -f ${OUTPUT_DIR}/include/H5Fc*.h rm -f ${OUTPUT_DIR}/include/H5Fi*.h rm -f ${OUTPUT_DIR}/include/H5Fl*.h rm -f ${OUTPUT_DIR}/include/H5Fp*.h rm -f ${OUTPUT_DIR}/include/H5G*.h rm -f ${OUTPUT_DIR}/include/H5I*.h rm -f ${OUTPUT_DIR}/include/H5L*.h rm -f ${OUTPUT_DIR}/include/H5M*.h rm -f ${OUTPUT_DIR}/include/H5[Oo]*.h rm -f ${OUTPUT_DIR}/include/H5[Pp]*.h rm -f ${OUTPUT_DIR}/include/H5R*.h rm -f ${OUTPUT_DIR}/include/H5S*.h rm -f ${OUTPUT_DIR}/include/H5T*.h rm -f ${OUTPUT_DIR}/include/H5[Vv]*.h rm -f ${OUTPUT_DIR}/include/H5Z*.h rm -f ${OUTPUT_DIR}/include/h5*.mod rm -rf ${OUTPUT_DIR}/include/hdf5*.* rm -f ${OUTPUT_DIR}/include/tst*.mod rm -rf ${OUTPUT_DIR}/share/hdf5_examples rm -rf ${BUILD_TYPE} }