Skip to content

Commit 0244565

Browse files
committed
Copying updated installation script from release branch and removing older package-specific build scripts.
Signed-off-by: Damian Rouson <damian@rouson.net>
1 parent 388d2c3 commit 0244565

File tree

5 files changed

+60
-473
lines changed

5 files changed

+60
-473
lines changed

install.sh

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,34 @@ find_or_install()
159159
fi
160160

161161
# Now we know the $executable is not in the PATH or is not an acceptable version
162-
printf "Ok to downloand, build, and install $package from source?\n"
162+
printf "Ok to downloand, build, and install $package from source? (y/n) "
163+
read proceed
163164
if [[ $proceed == "y" ]]; then
164165
printf "Downloading, building, and installing $package \n"
165166
cd install_prerequisites &&
166167
if [[ $package == "gcc" ]]; then
167-
FC=gfortran CC=gcc CXX=g++ ./build flex --default $num_threads
168-
flex_install_path=`./build flex --default --query` &&
169-
PATH=$flex_install_path/bin:$PATH
168+
# Building GCC from source requires flex
169+
printf "Building requires the 'flex' package.\n"
170+
printf "Checking flex is in the PATH... "
171+
if type flex > /dev/null; then
172+
printf "yes\n"
173+
else
174+
printf "no\n"
175+
printf "Ok to downloand, build, and install flex from source? (y/n) "
176+
read build_flex
177+
if [[ $build_flex == "y" ]]; then
178+
FC=gfortran CC=gcc CXX=g++ ./build flex
179+
flex_install_path=`./build flex --default --query` &&
180+
if [[ -f $flex_install_path/bin/flex ]]; then
181+
printf "Installation successful."
182+
printf "$package is in $flex_install_path/bin \n"
183+
fi
184+
PATH=$flex_install_path/bin:$PATH
185+
else
186+
printf "Aborting. Building GCC requires flex.\n"
187+
exit 1
188+
fi
189+
fi
170190
fi
171191
FC=gfortran CC=gcc CXX=g++ ./build $package --default $num_threads &&
172192
package_install_path=`./build $package --default --query` &&
@@ -189,7 +209,7 @@ find_or_install()
189209
exit 1
190210
fi
191211
else
192-
printf "Aborting. OpenCoarrays installation requires $package"
212+
printf "Aborting. OpenCoarrays installation requires $package \n"
193213
exit 1
194214
fi
195215
printf "$this_script: the dependency installation logic is missing a return or exit.\n"
Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1+
!
2+
! acceptable_compiler
3+
!
4+
! -- Report whether the compiler version equals or exceeds the first
5+
! OpenCoarrays-aware version
6+
!
7+
! OpenCoarrays is distributed under the OSI-approved BSD 3-clause License:
8+
! Copyright (c) 2015, Sourcery, Inc.
9+
! Copyright (c) 2015, Sourcery Institute
10+
! All rights reserved.
11+
!
12+
! Redistribution and use in source and binary forms, with or without modification,
13+
! are permitted provided that the following conditions are met:
14+
!
15+
! 1. Redistributions of source code must retain the above copyright notice, this
16+
! list of conditions and the following disclaimer.
17+
! 2. Redistributions in binary form must reproduce the above copyright notice, this
18+
! list of conditions and the following disclaimer in the documentation and/or
19+
! other materials provided with the distribution.
20+
! 3. Neither the names of the copyright holders nor the names of their contributors
21+
! may be used to endorse or promote products derived from this software without
22+
! specific prior written permission.
23+
!
24+
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25+
! ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26+
! WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27+
! IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28+
! INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29+
! NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30+
! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31+
! WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32+
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33+
! POSSIBILITY OF SUCH DAMAGE.
34+
135
program main
236
use iso_fortran_env, only : compiler_version
337
implicit none
4-
print *,compiler_version() >= " GCC version 5.1.0"
38+
print *,compiler_version() >= "GCC version 5.1.0 "
539
end program

install_prerequisites/buildcmake

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)