<commit_before>#!/bin/bash
#
# Build information for netcdf_fortran
#
# $Id$
#
######################################################################

######################################################################
#
# Version
#
######################################################################

mydir=`dirname $BASH_SOURCE`
source $mydir/netcdf_fortran_aux.sh
source $mydir/netcdf_aux.sh

######################################################################
#
# Builds, deps, mask, auxdata, paths, builds of other packages
#
######################################################################

setNetcdf_fortranGlobalVars() {
  if test -z "$NETCDF_FORTRAN_BUILDS"; then
    case `uname` in
      CYGWIN*) NETCDF_FORTRAN_BUILDS=NONE;;
      *) NETCDF_FORTRAN_BUILDS=ser,sersh,par;;  # Only parallel, with netcdf4 works
    esac
  fi
  NETCDF_FORTRAN_DEPS="netcdf,hdf5,cmake"
  NETCDF_FORTRAN_UMASK=002
}
setNetcdf_fortranGlobalVars

######################################################################
#
# Launch netcdf_fortran builds.
#
######################################################################

buildNetcdf_fortran() {

  if ! bilderUnpack netcdf_fortran; then
    return
  fi

# netcdf location specified by cppflags!
  local blddirvar=`genbashvar NETCDF_FORTRAN_${bld}`_DIR
  local nclsd=lib
  if test -d $NETCDF_SER_DIR/lib64; then
    nclsd=lib64
  fi
  NETCDF_FORTRAN_SER_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS=-I$NETCDF_SER_DIR/include FCFLAGS=-I$NETCDF_SER_DIR/include LIBS=-lnetcdf LDFLAGS=-L$NETCDF_SER_DIR/$nclsd"
  test -n "$FC" && NETCDF_FORTRAN_SER_ADDL_ARGS="FC=$FC ${NETCDF_FORTRAN_SER_ADDL_ARGS}"
  NETCDF_FORTRAN_SERSH_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS=-I$NETCDF_SERSH_DIR/include FCFLAGS=-I$NETCDF_SERSH_DIR/include LIBS=-lnetcdf LDFLAGS=-L$NETCDF_SERSH_DIR/$nclsd"
  test -n "$FC" && NETCDF_FORTRAN_SERSH_ADDL_ARGS="FC=$FC ${NETCDF_FORTRAN_SERSH_ADDL_ARGS}"
  NETCDF_FORTRAN_PAR_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS=-I$NETCDF_PAR_DIR/include FCFLAGS=-I$NETCDF_PAR_DIR/include LIBS=-lnetcdf LDFLAGS=-L$NETCDF_PAR_DIR/$nclsd"
  test -n "$MPIFC" && NETCDF_FORTRAN_PAR_ADDL_ARGS="FC=$MPIFC ${NETCDF_FORTRAN_PAR_ADDL_ARGS}"

# Serial build
  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-ser netcdf_fortran ser "--disable-shared --enable-static $CONFIG_COMPILERS_SER $CONFIG_COMPFLAGS_SER $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_SER_ADDL_ARGS $NETCDF_FORTRAN_SER_OTHER_ARGS"; then
    bilderBuild netcdf_fortran ser
  fi

  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-sersh netcdf_fortran sersh "--disable-shared --enable-static $CONFIG_COMPILERS_SERSH $CONFIG_COMPFLAGS_SERSH $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_SERSH_ADDL_ARGS $NETCDF_FORTRAN_SERSHOTHER_ARGS"; then
    bilderBuild netcdf_fortran sersh
  fi

# Parallel build
  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-par netcdf_fortran par "--disable-shared --enable-static $CONFIG_COMPILERS_PAR $CONFIG_COMPFLAGS_PAR $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_PAR_ADDL_ARGS $NETCDF_FORTRAN_PAR_OTHER_ARGS"; then
    bilderBuild netcdf_fortran par
  fi

}

######################################################################
#
# Test netcdf_fortran
#
######################################################################

testNetcdf_fortran() {
  techo "Not testing netcdf_fortran."
}
<commit_msg>Fix netcdf_fortran build.<commit_after>#!/bin/bash
#
# Build information for netcdf_fortran
#
# $Id$
#
######################################################################

######################################################################
#
# Version
#
######################################################################

mydir=`dirname $BASH_SOURCE`
source $mydir/netcdf_fortran_aux.sh
source $mydir/netcdf_aux.sh

######################################################################
#
# Builds, deps, mask, auxdata, paths, builds of other packages
#
######################################################################

setNetcdf_fortranGlobalVars() {
  if test -z "$NETCDF_FORTRAN_BUILDS"; then
    case `uname` in
      CYGWIN*) NETCDF_FORTRAN_BUILDS=NONE;;
      *) NETCDF_FORTRAN_BUILDS=ser,sersh,par;;  # Only parallel, with netcdf4 works
    esac
  fi
  NETCDF_FORTRAN_DEPS="netcdf,hdf5,cmake"
  NETCDF_FORTRAN_UMASK=002
}
setNetcdf_fortranGlobalVars

######################################################################
#
# Launch netcdf_fortran builds.
#
######################################################################

buildNetcdf_fortran() {

  if ! bilderUnpack netcdf_fortran; then
    return
  fi

# netcdf location specified by cppflags!
  local blddirvar=`genbashvar NETCDF_FORTRAN_${bld}`_DIR
  local nclsd=lib
  if test -d $NETCDF_SER_DIR/lib64; then
    nclsd=lib64
  fi
  NETCDF_FORTRAN_SER_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS='-I$NETCDF_SER_DIR/include' FCFLAGS='-I$NETCDF_SER_DIR/include' LIBS='-lnetcdf' LDFLAGS='-L$NETCDF_SER_DIR/$nclsd'"
  test -n "$FC" && NETCDF_FORTRAN_SER_ADDL_ARGS="FC=$FC ${NETCDF_FORTRAN_SER_ADDL_ARGS}"
  NETCDF_FORTRAN_SERSH_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS='-I$NETCDF_SERSH_DIR/include' FCFLAGS='-I$NETCDF_SERSH_DIR/include' LIBS='-lnetcdf'"
  case `uname` in
    Linux)
      NETCDF_FORTRAN_SERSH_ADDL_ARGS="${NETCDF_FORTRAN_SERSH_ADDL_ARGS} LDFLAGS='-L$NETCDF_SERSH_DIR/$nclsd -Wl,-rpath,$NETCDF_SERSH_DIR/$nclsd'"
      ;;
    *)
      NETCDF_FORTRAN_SERSH_ADDL_ARGS="${NETCDF_FORTRAN_SERSH_ADDL_ARGS} LDFLAGS='-L$NETCDF_SERSH_DIR/$nclsd'"
      ;;
  esac
  test -n "$FC" && NETCDF_FORTRAN_SERSH_ADDL_ARGS="FC='$FC' ${NETCDF_FORTRAN_SERSH_ADDL_ARGS}"
  NETCDF_FORTRAN_PAR_ADDL_ARGS="${NETCDF_FORTRAN_ADDL_ARGS} CPPFLAGS='-I$NETCDF_PAR_DIR/include' FCFLAGS='-I$NETCDF_PAR_DIR/include' LIBS='-lnetcdf LDFLAGS='-L$NETCDF_PAR_DIR/$nclsd'"
  test -n "$MPIFC" && NETCDF_FORTRAN_PAR_ADDL_ARGS="FC=$MPIFC ${NETCDF_FORTRAN_PAR_ADDL_ARGS}"

# Serial build
  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-ser netcdf_fortran ser "--disable-shared --enable-static $CONFIG_COMPILERS_SER $CONFIG_COMPFLAGS_SER $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_SER_ADDL_ARGS $NETCDF_FORTRAN_SER_OTHER_ARGS"; then
    bilderBuild netcdf_fortran ser
  fi

  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-sersh netcdf_fortran sersh "--disable-shared --enable-static $CONFIG_COMPILERS_SERSH $CONFIG_COMPFLAGS_SERSH $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_SERSH_ADDL_ARGS $NETCDF_FORTRAN_SERSHOTHER_ARGS"; then
    bilderBuild netcdf_fortran sersh
  fi

# Parallel build
  if bilderConfig -p netcdf-${NETCDF_BLDRVERSION}-par netcdf_fortran par "--disable-shared --enable-static $CONFIG_COMPILERS_PAR $CONFIG_COMPFLAGS_PAR $MINGW_RC_COMPILER_FLAG $NETCDF_FORTRAN_PAR_ADDL_ARGS $NETCDF_FORTRAN_PAR_OTHER_ARGS"; then
    bilderBuild netcdf_fortran par
  fi

}

######################################################################
#
# Test netcdf_fortran
#
######################################################################

testNetcdf_fortran() {
  techo "Not testing netcdf_fortran."
}

{'fraction_non_alphanumeric': 0.26428266134777034, 'fraction_numerical': 0.00256446787291637, 'mean_word_length': 7.808030112923463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1431685', 'n_tokens_mistral': 2618, 'n_tokens_neox': 2570, 'n_words': 343}