diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a213ca6f3c81bab0e287e89fc826472b498604..9423f46486f09fbf76d64f4806180910e8ff5235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * If the `${LDFLAGS}` environment variable is set in the environment, any `-L` options are dropped from it, so that the `$FSLDEVDIR` can explicitly be set to take precedence over `$FSLDIR`. +* `${FSLDEVDIR}` doesn't have to exist - if it is set before + `${FSLDIR}/etc/fslconf/fsl-devel.sh` is run, it will not be overridden. ## 2111.8 (Friday 26th November 2021) diff --git a/etc/fslconf/fsl-devel.sh b/etc/fslconf/fsl-devel.sh index 8af3104c7a7ffe8e388012ec6e530309b731f69b..c97a3d43bba2149ca5cc937dc497332ea76a6f7d 100644 --- a/etc/fslconf/fsl-devel.sh +++ b/etc/fslconf/fsl-devel.sh @@ -13,15 +13,19 @@ # FSLCONFDIR contains the FSL Makefile machinery # for compiling and installing FSL Makefile-based # projects. -if [ ! -d "$FSLCONFDIR" ]; then - export FSLCONFDIR=$FSLDIR/config +if [ ! -d "${FSLCONFDIR}" ]; then + export FSLCONFDIR=${FSLDIR}/config fi # FSLDEVDIR is an optional installation destination # for development, so that locally built projects # can be installed separately from FSLDIR. -if [ ! -d "$FSLDEVDIR" ]; then - export FSLDEVDIR=$FSLDIR +# +# FSLDEVDIR doesn't necessarily have to exist, as +# it will be created the first time "make install" +# is run in a project directory. +if [ -z "${FSLDEVDIR}" ]; then + export FSLDEVDIR=${FSLDIR} fi source $FSLDIR/etc/fslconf/fsl.sh