Skip to content

Commit c5a166e

Browse files
committed
Bumping version to 1.1.3. Adding --avail/-a argument and flex pre-requisite check to buildgcc script.
1 parent e2e7f5d commit c5a166e

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.0)
22

33
#Name project and specify source languages
4-
project(opencoarrays VERSION 1.1.2 LANGUAGES C Fortran)
4+
project(opencoarrays VERSION 1.1.3 LANGUAGES C Fortran)
55

66
#Print an error message on an attempt to build inside the source directory tree:
77
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")

install_prerequisites/buildgcc

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ usage()
4747
echo " Options:"
4848
echo " --help, -h Show this help message"
4949
echo " --version, -v, -V Report version and copyright information"
50+
echo " --avail, -a, List the available branches"
5051
echo ""
5152
echo " Example usage:"
5253
echo ""
@@ -56,9 +57,6 @@ usage()
5657
echo " $cmd -v"
5758
echo " $cmd --help"
5859
echo ""
59-
echo " Note: use svn ls svn://gcc.gnu.org/svn/gcc/branches"
60-
echo " to list all available branches."
61-
echo ""
6260
exit 1
6361
}
6462

@@ -71,7 +69,7 @@ fi
7169

7270
# Default to 2 threads if no specified thread count:
7371
if [ -z $3 ]; then
74-
num_threads=2
72+
num_threads=1
7573
else
7674
num_threads=$3
7775
fi
@@ -87,13 +85,28 @@ build()
8785
make -j $num_threads bootstrap
8886
}
8987

88+
# Exit if subversion is not installed
89+
if ! type svn > /dev/null; then
90+
echo
91+
echo "$cmd requires 'svn'. Please install it. Aborting."
92+
exit 1;
93+
fi
94+
95+
# Exit if flex is not installed
96+
if ! type flex > /dev/null; then
97+
echo
98+
echo "$cmd requires 'flex'. Please install it. Aborting."
99+
exit 1;
100+
fi
90101

91102
if [ $# == 0 ]; then
92103
# Print usage information if script is invoked without arguments
93104
usage | less
94105
elif [[ $1 == '--help' || $1 == '-h' ]]; then
95106
# Print usage information if script is invoked with --help or -h argument
96107
usage | less
108+
elif [[ $1 == '--avail' || $1 == '-a' ]]; then
109+
svn ls svn://gcc.gnu.org/svn/gcc/branches | less
97110
elif [[ $1 == '-v' || $1 == '-V' || $1 == '--version' ]]; then
98111
# Print script copyright if invoked with -v, -V, or --version argument
99112
echo ""
@@ -114,14 +127,8 @@ else
114127
# Build gcc
115128
time \
116129
{
117-
if ! type svn > /dev/null; then
118-
echo
119-
echo "$cmd requires 'svn'. Please install it. Aborting."
120-
exit 1;
121-
else
122-
svn co svn://gcc.gnu.org/svn/gcc/$url_tail &&
123-
build $1 $install_path $num_threads
124-
fi
130+
svn co svn://gcc.gnu.org/svn/gcc/$url_tail &&
131+
build $1 $install_path $num_threads
125132
} >&1 | tee build.log
126133
echo "Check build.log for results. If the build was successful, type"
127134
echo "'cd $1-build && make install' (or 'cd $1-build && sudo make install')"

0 commit comments

Comments
 (0)