From 338da2da21ff27a0b1a40cf0af6ec82899449ab6 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 13 Nov 2019 23:23:28 +0100 Subject: [PATCH] document git submodules, check for submodules, fail if bison or boost not present --- README.md | 14 +++++++++++++- Rez/CMakeLists.txt | 11 ++++++----- build-toolchain.bash | 10 ++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f5a77afd0a..61d9a15441 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,16 @@ wolfgang.thaller@gmx.net. Installing/Building ------------------- +The Retro68 git repository uses submodules; be sure to use the `--recursive` option to `git clone` or use + + git submodule update --init + +after cloning. To get the latest changes, use + + git pull + git submodule update + + ### Prerequisites - Linux, Mac OS X or Windows (via Cygwin) @@ -20,12 +30,14 @@ Installing/Building - GCC dependencies: GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+ - bison version 3.0.2 or later - ruby version 2.1 or later +- flex +- texinfo - Recommended: Apple Universal Interfaces (version 3.x; version 3.4 is tested) - An ancient Mac and/or an emulator. For Ubuntu Linux, the following should help a bit: - sudo apt-get install cmake libgmp-dev libmpfr-dev libmpc-dev libboost-all-dev bison texinfo ruby + sudo apt-get install cmake libgmp-dev libmpfr-dev libmpc-dev libboost-all-dev bison flex texinfo ruby On a Mac, get the homebrew package manager and: diff --git a/Rez/CMakeLists.txt b/Rez/CMakeLists.txt index f63e6b698f..75bf239d5f 100644 --- a/Rez/CMakeLists.txt +++ b/Rez/CMakeLists.txt @@ -24,8 +24,13 @@ find_package(Boost COMPONENTS wave filesystem system thread regex program_option set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} "/usr/local/opt/bison/bin") find_package(BISON 3.0.2) -if(Boost_FOUND AND BISON_FOUND) +if(NOT Boost_FOUND) + message(FATAL_ERROR "The boost libraries have not been found.") +endif() +if(NOT BISON_FOUND) + message(FATAL_ERROR "GNU Bison version 3.0.2 or later is required.") +endif() include_directories(. ${CMAKE_CURRENT_BINARY_DIR}) @@ -78,7 +83,3 @@ target_include_directories(Rez PRIVATE ${Boost_INCLUDE_DIR}) install(TARGETS Rez RUNTIME DESTINATION bin) add_subdirectory(Test) - -else(Boost_FOUND AND BISON_FOUND) - message(WARNING "Rez compiler will not be built; both boost and Bison 3.0.2 are required") -endif(Boost_FOUND AND BISON_FOUND) diff --git a/build-toolchain.bash b/build-toolchain.bash index bef0b523dc..e97fc450c7 100755 --- a/build-toolchain.bash +++ b/build-toolchain.bash @@ -24,6 +24,16 @@ DEFAULT_PREFIX=`pwd -P`/toolchain/ PREFIX=$DEFAULT_PREFIX BINUTILS=`pwd -P`/binutils-build +##################### Prerequisites check + +if [ ! -d "$SRC/multiversal" ]; then + echo "Could not find directory '$SRC/multiversal'." + echo "It looks like you did not clone the git submodules." + echo "Please run:" + echo " git submodule update --init" + exit 1 +fi + ##################### Command-line Options SKIP_THIRDPARTY=false