Changes in configure.sh [1c39d33b:b2cbc0b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.sh
r1c39d33b rb2cbc0b 39 39 CONFIG_RULES="${SOURCE_DIR}/HelenOS.config" 40 40 CONFIG_DEFAULTS="${SOURCE_DIR}/defaults" 41 42 41 43 42 test "$#" -eq 1 && { test "$1" = "-h" || test "$1" = "--help"; } … … 85 84 fi 86 85 87 if ! which meson ; then86 if ! which meson >/dev/null 2>/dev/null; then 88 87 echo "Your system does not have Meson installed." 89 88 echo 'Please use `pip3 install meson`' … … 91 90 fi 92 91 93 if ! which ninja ; then92 if ! which ninja >/dev/null 2>/dev/null; then 94 93 echo "Your system does not have ninja installed." 95 94 echo 'Please use `pip3 install ninja`' … … 98 97 99 98 # Link tools directory for convenience. 100 ln -s "${SOURCE_DIR}/tools" tools 99 if [ ! -e tools ]; then 100 ln -s "${SOURCE_DIR}/tools" tools 101 fi 101 102 102 103 # Run HelenOS config tool. … … 122 123 123 124 compname="$cc_arch-helenos-gcc" 125 unset compprefix 124 126 125 if which "$compname" ; then127 if which "$compname" >/dev/null 2>/dev/null; then 126 128 # Compiler is in PATH 127 129 compprefix="$cc_arch-helenos-" 128 130 129 131 elif [ -n "$CROSS_PREFIX" ]; then 130 if ! which "$CROSS_PREFIX/bin/$compname"; then 132 if which "$CROSS_PREFIX/bin/$compname" >/dev/null 2>/dev/null; then 133 compprefix="$CROSS_PREFIX/bin/$cc_arch-helenos-" 134 fi 135 136 if [ -z "$compprefix" ]; then 131 137 echo "ERROR: \$CROSS_PREFIX defined but $compname is not present in $CROSS_PREFIX/bin." 132 138 echo "Run tools/toolchain.sh to build cross-compiling toolchain." 133 139 exit 1 134 140 fi 141 else 142 if [ -z "$XDG_DATA_HOME" ]; then 143 XDG_DATA_HOME="$HOME/.local/share" 144 fi 135 145 136 compprefix="$CROSS_PREFIX/bin/$cc_arch-helenos-" 137 else 138 if ! which "/usr/local/cross/bin/$compname"; then 139 echo "ERROR: \$CROSS_PREFIX is not defined and $compname is not present in /usr/local/cross/bin." 146 if which "$XDG_DATA_HOME/HelenOS/cross/bin/$compname" >/dev/null 2>/dev/null; then 147 compprefix="$XDG_DATA_HOME/HelenOS/cross/bin/$cc_arch-helenos-" 148 elif which "/opt/HelenOS/cross/bin/$compname" >/dev/null 2>/dev/null; then 149 compprefix="/opt/HelenOS/cross/bin/$cc_arch-helenos-" 150 elif which "/usr/local/cross/bin/$compname" >/dev/null 2>/dev/null; then 151 compprefix="/usr/local/cross/bin/$cc_arch-helenos-" 152 fi 153 154 if [ -z "$compprefix" ]; then 155 echo "ERROR: \$CROSS_PREFIX is not defined and $compname is not present in any of the following standard locations." 156 echo " * $XDG_DATA_HOME/HelenOS/cross/bin" 157 echo " * /opt/HelenOS/cross/bin" 158 echo " * /usr/local/cross/bin" 140 159 echo "Run tools/toolchain.sh to build cross-compiling toolchain." 141 160 exit 1 142 161 fi 143 144 compprefix="/usr/local/cross/bin/$cc_arch-helenos-"145 162 fi 146 163 147 164 sed "s:@COMPPREFIX@:$compprefix:g" "$cross_def" > crossfile || exit 1 148 165 149 meson "${SOURCE_DIR}" '.' --cross-file crossfile || exit 1166 meson setup "${SOURCE_DIR}" '.' --cross-file crossfile || exit 1 150 167 151 168 echo
Note:
See TracChangeset
for help on using the changeset viewer.