@@ -108,8 +108,8 @@ usage()
108108 echo " $this_script [<options>] or [<installation-path> <number-of-threads>]"
109109 echo " "
110110 echo " Options:"
111- echo " -h, --help Show this help message"
112- echo " -v, -- version Show version information"
111+ echo " -h, --help Show this help message"
112+ echo " -v, -V, -- version Show version information"
113113 echo " "
114114 echo " Examples:"
115115 echo " "
@@ -615,10 +615,45 @@ find_or_install()
615615 fi # End 'if [[ "$package" != "none" ]]; then'
616616}
617617
618+ print_header ()
619+ {
620+ clear
621+ echo " "
622+ echo " *** A default build of OpenCoarrays requires CMake 3.4.0 or later ***"
623+ echo " *** and MPICH 3.1.4 wrapping GCC Fortran (gfortran) 5.1.0 or later. ***"
624+ echo " *** Additionally, CMake, MPICH, and GCC have their own prerequisites. ***"
625+ echo " *** This script will check for most known requirements in your PATH ***"
626+ echo " *** environment variable and in the default installation directory ***"
627+ echo " *** to which this script installs each missing prerequisite. The ***"
628+ echo " *** script will recursively traverse the following dependency tree ***"
629+ echo " *** and ask permission to download, build, and install any missing ***"
630+ echo " *** prerequisites: ***"
631+ echo " "
632+ tree $opencoarrays_src_dir /doc/dependency_tree | tail -n+2
633+ echo " "
634+ echo " *** All prequisites will be downloaded to, built in, and installed in ***"
635+ echo " $opencoarrays_src_dir /install_prerequisites"
636+ printf " *** OpenCoarrays will be installed "
637+ if [[ " $install_path " == " $opencoarrays_src_dir /opencoarrays-installation" ]]; then
638+ printf " in the above location also. ***\n"
639+ else
640+ printf " in ***\n"
641+ echo " $install_path "
642+ fi
643+
644+ printf " Ready to proceed? (y/n)"
645+ read install_now
646+ if [[ " $install_now " != " y" ]]; then
647+ printf " \n$this_script : Aborting. [exit 85]\n"
648+ exit 85
649+ fi
650+ }
651+
652+
653+
618654build_opencoarrays ()
619655{
620- # A default OpenCoarrays build requires CMake and MPICH. Secondary
621- # dependencies will be found or installed along the way.
656+ print_header
622657 find_or_install mpich &&
623658 find_or_install cmake &&
624659 mkdir -p $build_path &&
0 commit comments