Skip to content

Commit 0ae0bb9

Browse files
author
Damian Rouson
committed
Adding cmake, bison, and flex to the setup.sh script.
Signed-off-by: Damian Rouson <[email protected]>
1 parent ae8af14 commit 0ae0bb9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,10 +681,12 @@ report_results()
681681
echo ""
682682
echo "$install_path/bin."
683683
echo ""
684+
rm $install_path/setup.sh
684685
# Prepend the OpenCoarrays license to the setup.sh script:
685686
while IFS='' read -r line || [[ -n "$line" ]]; do
686687
echo "# $line" >> $install_path/setup.sh
687688
done < "$opencoarrays_src_dir/COPYRIGHT-BSD3"
689+
echo "# " >> $install_path/setup.sh
688690
echo "# Execute this script via the folowing commands: " >> $install_path/setup.sh
689691
echo "# cd $install_path " >> $install_path/setup.sh
690692
echo "# source setup.sh " >> $install_path/setup.sh
@@ -712,6 +714,30 @@ report_results()
712714
echo " export PATH=\"$mpich_install_path/bin\":\$PATH " >> $install_path/setup.sh
713715
echo "fi " >> $install_path/setup.sh
714716
fi
717+
cmake_install_path=`./build cmake --default --query-path`
718+
if [[ -x "$cmake_install_path/bin/cmake" ]]; then
719+
echo "if [[ -z \"\$PATH\" ]]; then " >> $install_path/setup.sh
720+
echo " export PATH=\"$cmake_install_path/bin\" " >> $install_path/setup.sh
721+
echo "else " >> $install_path/setup.sh
722+
echo " export PATH=\"$cmake_install_path/bin\":\$PATH " >> $install_path/setup.sh
723+
echo "fi " >> $install_path/setup.sh
724+
fi
725+
flex_install_path=`./build flex --default --query-path`
726+
if [[ -x "$flex_install_path/bin/flex" ]]; then
727+
echo "if [[ -z \"\$PATH\" ]]; then " >> $install_path/setup.sh
728+
echo " export PATH=\"$flex_install_path/bin\" " >> $install_path/setup.sh
729+
echo "else " >> $install_path/setup.sh
730+
echo " export PATH=\"$flex_install_path/bin\":\$PATH " >> $install_path/setup.sh
731+
echo "fi " >> $install_path/setup.sh
732+
fi
733+
bison_install_path=`./build bison --default --query-path`
734+
if [[ -x "$bison_install_path/bin/yacc" ]]; then
735+
echo "if [[ -z \"\$PATH\" ]]; then " >> $install_path/setup.sh
736+
echo " export PATH=\"$bison_install_path/bin\" " >> $install_path/setup.sh
737+
echo "else " >> $install_path/setup.sh
738+
echo " export PATH=\"$bison_install_path/bin\":\$PATH " >> $install_path/setup.sh
739+
echo "fi " >> $install_path/setup.sh
740+
fi
715741
echo "*** Before using caf, cafrun, or build, please execute the following command ***"
716742
echo "*** or add it to your login script and launch a new shell (or the equivalent ***"
717743
echo "*** for your shell if you are not using a bash shell): ***"

0 commit comments

Comments
 (0)