Skip to content

Commit d54cc6f

Browse files
authored
Toolchain: Remove redundant exporting variables (#7230)
* Remove redundant exporting variables * Make pretty * Compatibility with CMake 4.x * Fix * Make remove_path more robust
1 parent fbec33a commit d54cc6f

22 files changed

Lines changed: 85 additions & 205 deletions

toolchain/scripts/package_versions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ libxc_alt_ver="6.2.2"
7575
libxc_alt_sha256="f72ed08af7b9dff5f57482c5f97bff22c7dc49da9564bc93871997cbda6dacf3"
7676

7777
# ScaLAPACK (supports dual versions) - main=2.2.2, alt=2.2.1
78-
scalapack_main_ver="2.2.2"
79-
scalapack_main_sha256="a2f0c9180a210bf7ffe126c9cb81099cf337da1a7120ddb4cbe4894eb7b7d022"
80-
scalapack_alt_ver="2.2.1"
81-
scalapack_alt_sha256="4aede775fdb28fa44b331875730bcd5bab130caaec225fadeccf424c8fcb55aa"
78+
scalapack_main_ver="2.2.3"
79+
scalapack_main_sha256="5d93701eca663925e98010dd8d0f45fd79b2191d74e5afa5711d587370a8b9dd"
80+
scalapack_alt_ver="2.2.2"
81+
scalapack_alt_sha256="a2f0c9180a210bf7ffe126c9cb81099cf337da1a7120ddb4cbe4894eb7b7d022"
8282

8383
# =============================================================================
8484
# STAGE 4: Advanced Feature Libraries

toolchain/scripts/stage0/install_amd.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,6 @@ export FC="${FC}"
8585
export F90="${F90}"
8686
export F77="${F77}"
8787
EOF
88-
if [ "${with_amd}" != "__SYSTEM__" ]; then
89-
cat << EOF >> "${BUILDDIR}/setup_amd"
90-
prepend_path PATH "${pkg_install_dir}/bin"
91-
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
92-
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
93-
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
94-
prepend_path CPATH "${pkg_install_dir}/include"
95-
EOF
96-
fi
9788
cat << EOF >> "${BUILDDIR}/setup_amd"
9889
export AMD_CFLAGS="${AMD_CFLAGS}"
9990
export AMD_LDFLAGS="${AMD_LDFLAGS}"

toolchain/scripts/stage0/install_cmake.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ case "${with_cmake}" in
9191
fi
9292
pkg_install_dir="${INSTALLDIR}/cmake-${cmake_ver}"
9393
#pkg_install_dir="${HOME}/apps/cmake/${cmake_ver}"
94-
install_lock_file="$pkg_install_dir/install_successful"
94+
install_lock_file="${pkg_install_dir}/install_successful"
9595
cmake_pkg="cmake-${cmake_ver}-${cmake_arch}.${cmake_ext}"
9696
if verify_checksums "${install_lock_file}"; then
9797
echo "cmake-${cmake_ver} is already installed, skipping it."
@@ -138,7 +138,6 @@ if [ "${with_cmake}" != "__DONTUSE__" ]; then
138138
if [ "${with_cmake}" != "__SYSTEM__" ]; then
139139
cat << EOF > "${BUILDDIR}/setup_cmake"
140140
prepend_path PATH "${pkg_install_dir}/bin"
141-
export PATH="${pkg_install_dir}/bin":\${PATH}
142141
EOF
143142
cat "${BUILDDIR}/setup_cmake" >> $SETUPFILE
144143
fi

toolchain/scripts/stage0/install_gcc.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ case "${with_gcc}" in
4949
repack_filename="gcc-${gcc_ver}-with-prereq.tar.gz"
5050
repkg_install_dir="${INSTALLDIR}/${repack_filename}"
5151
#pkg_install_dir="${HOME}/apps/gcc/${gcc_ver}"
52-
install_lock_file="$pkg_install_dir/install_successful"
52+
install_lock_file="${pkg_install_dir}/install_successful"
5353
if verify_checksums "${install_lock_file}"; then
5454
echo "gcc-${gcc_ver} is already installed, skipping it."
5555
else
@@ -229,13 +229,6 @@ prepend_path LD_RUN_PATH "${pkg_install_dir}/lib64"
229229
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
230230
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib64"
231231
prepend_path CPATH "${pkg_install_dir}/include"
232-
export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH}
233-
export LD_LIBRARY_PATH="${pkg_install_dir}/lib64":\${LD_LIBRARY_PATH}
234-
export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH}
235-
export LD_RUN_PATH="${pkg_install_dir}/lib64":\${LD_RUN_PATH}
236-
export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH}
237-
export LIBRARY_PATH="${pkg_install_dir}/lib64":\${LIBRARY_PATH}
238-
export CPATH="${pkg_install_dir}/include":\${CPATH}
239232
EOF
240233
fi
241234
cat << EOF >> "${BUILDDIR}/setup_gcc"

toolchain/scripts/stage0/install_intel.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ export FC="${FC}"
8989
export F90="${F90}"
9090
export F77="${F77}"
9191
EOF
92-
if [ "${with_intel}" != "__SYSTEM__" ]; then
93-
cat << EOF >> "${BUILDDIR}/setup_intel"
94-
prepend_path PATH "${pkg_install_dir}/bin"
95-
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
96-
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
97-
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
98-
prepend_path CPATH "${pkg_install_dir}/include"
99-
EOF
100-
fi
10192
cat << EOF >> "${BUILDDIR}/setup_intel"
10293
export INTEL_CFLAGS="${INTEL_CFLAGS}"
10394
export INTEL_LDFLAGS="${INTEL_LDFLAGS}"

toolchain/scripts/stage1/install_intelmpi.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,6 @@ export CP_CFLAGS="\${CP_CFLAGS} IF_MPI(${INTELMPI_CFLAGS}|)"
144144
export CP_LDFLAGS="\${CP_LDFLAGS} IF_MPI(${INTELMPI_LDFLAGS}|)"
145145
export CP_LIBS="\${CP_LIBS} IF_MPI(${INTELMPI_LIBS}|)"
146146
EOF
147-
if [ "${with_intelmpi}" != "__SYSTEM__" ]; then
148-
cat << EOF >> "${BUILDDIR}/setup_intelmpi"
149-
prepend_path PATH "${pkg_install_dir}/bin"
150-
export PATH="${pkg_install_dir}/bin":\${PATH}
151-
export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH}
152-
export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH}
153-
export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH}
154-
export CPATH="${pkg_install_dir}/include":\${CPATH}
155-
EOF
156-
fi
157147
cat "${BUILDDIR}/setup_intelmpi" >> ${SETUPFILE}
158148
fi
159149

toolchain/scripts/stage1/install_mpich.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ case "${with_mpich}" in
4848
echo "==================== Installing MPICH ===================="
4949
pkg_install_dir="${INSTALLDIR}/mpich-${mpich_ver}"
5050
#pkg_install_dir="${HOME}/apps/mpich/${mpich_ver}-intel"
51-
install_lock_file="$pkg_install_dir/install_successful"
51+
install_lock_file="${pkg_install_dir}/install_successful"
5252
url="https://www.mpich.org/static/downloads/${mpich_ver}/${mpich_pkg}"
5353
if verify_checksums "${install_lock_file}"; then
5454
echo "mpich-${mpich_ver} is already installed, skipping it."
@@ -176,11 +176,10 @@ EOF
176176
if [ "${with_mpich}" != "__SYSTEM__" ]; then
177177
cat << EOF >> "${BUILDDIR}/setup_mpich"
178178
prepend_path PATH "${pkg_install_dir}/bin"
179-
export PATH="${pkg_install_dir}/bin":\${PATH}
180-
export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH}
181-
export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH}
182-
export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH}
183-
export CPATH="${pkg_install_dir}/include":\${CPATH}
179+
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
180+
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
181+
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
182+
prepend_path CPATH "${pkg_install_dir}/include"
184183
EOF
185184
fi
186185
cat "${BUILDDIR}/setup_mpich" >> ${SETUPFILE}

toolchain/scripts/stage1/install_openmpi.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ case "${with_openmpi}" in
4747
__INSTALL__)
4848
echo "==================== Installing OpenMPI ===================="
4949
pkg_install_dir="${INSTALLDIR}/openmpi-${openmpi_ver}"
50-
install_lock_file="$pkg_install_dir/install_successful"
50+
install_lock_file="${pkg_install_dir}/install_successful"
5151
url="https://download.open-mpi.org/release/open-mpi/v${openmpi_ver%.*}/${openmpi_pkg}"
5252
if verify_checksums "${install_lock_file}"; then
5353
echo "openmpi-${openmpi_ver} is already installed, skipping it."
@@ -205,12 +205,10 @@ EOF
205205
if [ "${with_openmpi}" != "__SYSTEM__" ]; then
206206
cat << EOF >> "${BUILDDIR}/setup_openmpi"
207207
prepend_path PATH "${pkg_install_dir}/bin"
208-
export PATH="${pkg_install_dir}/bin":\${PATH}
209-
export LD_LIBRARY_PATH="${pkg_install_dir}/lib":\${LD_LIBRARY_PATH}
210-
export LD_RUN_PATH="${pkg_install_dir}/lib":\${LD_RUN_PATH}
211-
export LIBRARY_PATH="${pkg_install_dir}/lib":\${LIBRARY_PATH}
212-
export CPATH="${pkg_install_dir}/include":\${CPATH}
213-
208+
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
209+
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
210+
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
211+
prepend_path CPATH "${pkg_install_dir}/include"
214212
EOF
215213
fi
216214
cat "${BUILDDIR}/setup_openmpi" >> ${SETUPFILE}

toolchain/scripts/stage2/install_aocl.sh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,6 @@ case "${with_aocl}" in
5757
;;
5858
esac
5959
if [ "$with_aocl" != "__DONTUSE__" ]; then
60-
if [ "$with_aocl" != "__SYSTEM__" ]; then
61-
cat << EOF > "${BUILDDIR}/setup_aocl"
62-
prepend_path LD_LIBRARY_PATH "$pkg_install_dir/lib"
63-
prepend_path LD_RUN_PATH "$pkg_install_dir/lib"
64-
prepend_path LIBRARY_PATH "$pkg_install_dir/lib"
65-
prepend_path PKG_CONFIG_PATH "$pkg_install_dir/lib/pkgconfig"
66-
prepend_path CMAKE_PREFIX_PATH "$pkg_install_dir"
67-
prepend_path CPATH "$pkg_install_dir/include"
68-
export LD_LIBRARY_PATH="$pkg_install_dir/lib:"\${LD_LIBRARY_PATH}
69-
export LD_RUN_PATH="$pkg_install_dir/lib:"\${LD_RUN_PATH}
70-
export LIBRARY_PATH="$pkg_install_dir/lib:"\${LIBRARY_PATH}
71-
export CPATH="$pkg_install_dir/include:"\${CPATH}
72-
export PKG_CONFIG_PATH="$pkg_install_dir/lib/pkgconfig:"\${PKG_CONFIG_PATH}
73-
export CMAKE_PREFIX_PATH="$pkg_install_dir:"\${CMAKE_PREFIX_PATH}
74-
export AOCL_ROOT=${pkg_install_dir}
75-
EOF
76-
cat "${BUILDDIR}/setup_aocl" >> $SETUPFILE
77-
fi
7860
cat << EOF >> "${BUILDDIR}/setup_aocl"
7961
export AOCL_ROOT="${pkg_install_dir}"
8062
export AOCL_CFLAGS="${AOCL_CFLAGS}"

toolchain/scripts/stage2/install_openblas.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ case "${with_openblas}" in
4646
__INSTALL__)
4747
echo "==================== Installing OpenBLAS ===================="
4848
pkg_install_dir="${INSTALLDIR}/openblas-${openblas_ver}"
49-
install_lock_file="$pkg_install_dir/install_successful"
49+
install_lock_file="${pkg_install_dir}/install_successful"
5050
if verify_checksums "${install_lock_file}"; then
5151
echo "openblas-${openblas_ver} is already installed, skipping it."
5252
else
@@ -172,19 +172,10 @@ esac
172172
if [ "$with_openblas" != "__DONTUSE__" ]; then
173173
if [ "$with_openblas" != "__SYSTEM__" ]; then
174174
cat << EOF > "${BUILDDIR}/setup_openblas"
175-
prepend_path LD_LIBRARY_PATH "$pkg_install_dir/lib"
176-
prepend_path LD_RUN_PATH "$pkg_install_dir/lib"
177-
prepend_path LIBRARY_PATH "$pkg_install_dir/lib"
178-
prepend_path PKG_CONFIG_PATH "$pkg_install_dir/lib/pkgconfig"
179-
prepend_path CMAKE_PREFIX_PATH "$pkg_install_dir"
180-
prepend_path CPATH "$pkg_install_dir/include"
181-
export LD_LIBRARY_PATH="$pkg_install_dir/lib:"\${LD_LIBRARY_PATH}
182-
export LD_RUN_PATH="$pkg_install_dir/lib:"\${LD_RUN_PATH}
183-
export LIBRARY_PATH="$pkg_install_dir/lib:"\${LIBRARY_PATH}
184-
export CPATH="$pkg_install_dir/include:"\${CPATH}
185-
export PKG_CONFIG_PATH="$pkg_install_dir/lib/pkgconfig:"\${PKG_CONFIG_PATH}
186-
export CMAKE_PREFIX_PATH="$pkg_install_dir:"\${CMAKE_PREFIX_PATH}
187-
export OPENBLAS_ROOT=${pkg_install_dir}
175+
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
176+
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
177+
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
178+
prepend_path CPATH "${pkg_install_dir}/include"
188179
EOF
189180
cat "${BUILDDIR}/setup_openblas" >> $SETUPFILE
190181
fi
@@ -196,10 +187,8 @@ export OPENBLAS_LIBS="${OPENBLAS_LIBS}"
196187
export MATH_CFLAGS="\${MATH_CFLAGS} ${OPENBLAS_CFLAGS}"
197188
export MATH_LDFLAGS="\${MATH_LDFLAGS} ${OPENBLAS_LDFLAGS}"
198189
export MATH_LIBS="\${MATH_LIBS} ${OPENBLAS_LIBS}"
199-
export PKG_CONFIG_PATH="${pkg_install_dir}/lib/pkgconfig"
200-
export CMAKE_PREFIX_PATH="${pkg_install_dir}"
201-
prepend_path PKG_CONFIG_PATH "$pkg_install_dir/lib/pkgconfig"
202-
prepend_path CMAKE_PREFIX_PATH "$pkg_install_dir"
190+
prepend_path PKG_CONFIG_PATH "${pkg_install_dir}/lib/pkgconfig"
191+
prepend_path CMAKE_PREFIX_PATH "${pkg_install_dir}"
203192
EOF
204193
fi
205194

0 commit comments

Comments
 (0)