@@ -45,7 +45,17 @@ report_results()
45
45
echo " # Execute this script via the following command: " | tee -a setup.csh setup.sh
46
46
echo " # source ${install_path%/ } /setup.sh " | tee -a setup.csh setup.sh
47
47
echo " " | tee -a setup.csh setup.sh
48
+ if [[ -x " $cmake_install_path /cmake" ]]; then
49
+ echo " # Prepend the CMake path to the PATH environment variable:" | tee -a setup.sh setup.csh
50
+ echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
51
+ echo " export PATH=\" ${cmake_install_path%/ } /\" " >> setup.sh
52
+ echo " else " >> setup.sh
53
+ echo " export PATH=\" ${cmake_install_path%/ } /\" :\$ PATH " >> setup.sh
54
+ echo " fi " >> setup.sh
55
+ echo " set path = (\" ${cmake_install_path%/ } \" /\"\$ path\" ) " >> setup.csh
56
+ fi
48
57
if [[ -x " $fully_qualified_FC " ]]; then
58
+ echo " # Prepend the compiler path to the PATH environment variable:" | tee -a setup.sh setup.csh
49
59
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
50
60
echo " export PATH=\" ${compiler_install_root%/ } /bin\" " >> setup.sh
51
61
echo " else " >> setup.sh
@@ -54,6 +64,7 @@ report_results()
54
64
echo " set path = (\" ${compiler_install_root%/ } \" /bin \"\$ path\" ) " >> setup.csh
55
65
fi
56
66
if [[ -d " ${compiler_install_root%/ } /lib" || -d " ${compiler_install_root%/ } /lib64" ]]; then
67
+ echo " # Prepend the compiler library paths to the LD_LIBRARY_PATH environment variable:" | tee -a setup.sh setup.csh
57
68
compiler_lib_paths=" ${compiler_install_root%/ } /lib64/:${compiler_install_root%/ } /lib"
58
69
echo " if [[ -z \"\$ LD_LIBRARY_PATH\" ]]; then " >> setup.sh
59
70
echo " export LD_LIBRARY_PATH=\" ${compiler_lib_paths%/ } \" " >> setup.sh
@@ -64,21 +75,14 @@ report_results()
64
75
fi
65
76
echo " " >> setup.sh
66
77
if [[ -x " $mpi_install_root /bin/mpif90" ]]; then
78
+ echo " # Prepend the MPI path to the PATH environment variable:" | tee -a setup.sh setup.csh
67
79
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
68
80
echo " export PATH=\" ${mpi_install_root%/ } /bin\" " >> setup.sh
69
81
echo " else " >> setup.sh
70
82
echo " export PATH=\" ${mpi_install_root%/ } /bin\" :\$ PATH " >> setup.sh
71
83
echo " fi " >> setup.sh
72
84
echo " set path = (\" ${mpi_install_root%/ } \" /bin \"\$ path\" ) " >> setup.csh
73
85
fi
74
- if [[ -x " $cmake_install_path /cmake" ]]; then
75
- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
76
- echo " export PATH=\" ${cmake_install_path%/ } /\" " >> setup.sh
77
- echo " else " >> setup.sh
78
- echo " export PATH=\" ${cmake_install_path%/ } /\" :\$ PATH " >> setup.sh
79
- echo " fi " >> setup.sh
80
- echo " set path = (\" ${cmake_install_path%/ } \" /\"\$ path\" ) " >> setup.csh
81
- fi
82
86
# In all likelihood, the following paths are only needed if OpenCoarrays built them,
83
87
# In by far the most common such use case, they would have been built in a recursive
84
88
# build of all the OpenCoarrays dependency tree (rather than built indvidually via
@@ -88,6 +92,7 @@ report_results()
88
92
# user doesn't need them at all (e.g. there was no need to build gfortran from source).
89
93
flex_install_path=$( " ${build_script} " -P flex)
90
94
if [[ -x " $flex_install_path /bin/flex" ]]; then
95
+ echo " # Prepend the flex path to the PATH environment variable:" | tee -a setup.sh setup.csh
91
96
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
92
97
echo " export PATH=\" $flex_install_path /bin\" " >> setup.sh
93
98
echo " else " >> setup.sh
@@ -97,6 +102,7 @@ report_results()
97
102
fi
98
103
bison_install_path=$( " ${build_script} " -P bison)
99
104
if [[ -x " $bison_install_path /bin/yacc" ]]; then
105
+ echo " # Prepend the bison path to the PATH environment variable:" | tee -a setup.sh setup.csh
100
106
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
101
107
echo " export PATH=\" $bison_install_path /bin\" " >> setup.sh
102
108
echo " else " >> setup.sh
@@ -106,6 +112,7 @@ report_results()
106
112
fi
107
113
m4_install_path=$( " ${build_script} " -P m4)
108
114
if [[ -x " $m4_install_path /bin/m4" ]]; then
115
+ echo " # Prepend the m4 path to the PATH environment variable:" | tee -a setup.sh setup.csh
109
116
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
110
117
echo " export PATH=\" $m4_install_path /bin\" " >> setup.sh
111
118
echo " else " >> setup.sh
@@ -115,6 +122,7 @@ report_results()
115
122
fi
116
123
opencoarrays_install_path=" ${install_path} "
117
124
if [[ -x " $opencoarrays_install_path /bin/caf" ]]; then
125
+ echo " # Prepend the OpenCoarrays path to the PATH environment variable:" | tee -a setup.sh setup.csh
118
126
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
119
127
echo " export PATH=\" ${opencoarrays_install_path%/ } /bin\" " >> setup.sh
120
128
echo " else " >> setup.sh
0 commit comments