@@ -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
@@ -63,13 +74,14 @@ report_results()
63
74
echo " set LD_LIBRARY_PATH = (\" ${compiler_lib_paths%/ } \" /bin \"\$ LD_LIBRARY_PATH\" ) " >> setup.csh
64
75
fi
65
76
echo " " >> setup.sh
66
- if [[ -x " $cmake_install_path /cmake" ]]; then
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
- echo " export PATH=\" ${cmake_install_path %/ } /\" " >> setup.sh
80
+ echo " export PATH=\" ${mpi_install_root %/ } /bin \" " >> setup.sh
69
81
echo " else " >> setup.sh
70
- echo " export PATH=\" ${cmake_install_path %/ } /\" :\$ PATH " >> setup.sh
82
+ echo " export PATH=\" ${mpi_install_root %/ } /bin \" :\$ PATH " >> setup.sh
71
83
echo " fi " >> setup.sh
72
- echo " set path = (\" ${cmake_install_path %/ } \" /\"\$ path\" ) " >> setup.csh
84
+ echo " set path = (\" ${mpi_install_root %/ } \" /bin \"\$ path\" ) " >> setup.csh
73
85
fi
74
86
# In all likelihood, the following paths are only needed if OpenCoarrays built them,
75
87
# In by far the most common such use case, they would have been built in a recursive
@@ -80,6 +92,7 @@ report_results()
80
92
# user doesn't need them at all (e.g. there was no need to build gfortran from source).
81
93
flex_install_path=$( " ${build_script} " -P flex)
82
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
83
96
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
84
97
echo " export PATH=\" $flex_install_path /bin\" " >> setup.sh
85
98
echo " else " >> setup.sh
@@ -89,6 +102,7 @@ report_results()
89
102
fi
90
103
bison_install_path=$( " ${build_script} " -P bison)
91
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
92
106
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
93
107
echo " export PATH=\" $bison_install_path /bin\" " >> setup.sh
94
108
echo " else " >> setup.sh
@@ -98,23 +112,17 @@ report_results()
98
112
fi
99
113
m4_install_path=$( " ${build_script} " -P m4)
100
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
101
116
echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
102
117
echo " export PATH=\" $m4_install_path /bin\" " >> setup.sh
103
118
echo " else " >> setup.sh
104
119
echo " export PATH=\" $m4_install_path /bin\" :\$ PATH " >> setup.sh
105
120
echo " fi " >> setup.sh
106
121
echo " set path = (\" $m4_install_path \" /bin \"\$ path\" ) " >> setup.csh
107
122
fi
108
- if [[ -x " $mpi_install_root /bin/mpif90" ]]; then
109
- echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
110
- echo " export PATH=\" ${mpi_install_root%/ } /bin\" " >> setup.sh
111
- echo " else " >> setup.sh
112
- echo " export PATH=\" ${mpi_install_root%/ } /bin\" :\$ PATH " >> setup.sh
113
- echo " fi " >> setup.sh
114
- echo " set path = (\" ${mpi_install_root%/ } \" /bin \"\$ path\" ) " >> setup.csh
115
- 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