#!/bin/bash set -e build_dir=$1 # With simpleBuildEnvironment flag, we're already in build directory # The source tree has been copied here by USM from sources/lz4 echo "Building LZ4 in ${build_dir}..." # Check if we need to navigate to the lz4 source directory if [ ! -f "./Makefile" ]; then if [ -d "sources/lz4" ]; then cd sources/lz4 elif [ -d "lz4" ]; then cd lz4 else echo "Error: Makefile not found" echo "Contents of current directory:" ls -la exit 1 fi fi # Build according to LFS instructions make BUILD_STATIC=no PREFIX=${PREFIX} echo "Build complete."