From 0794feb5b2dce286b0087e87ba580227d43ad576 Mon Sep 17 00:00:00 2001 From: Kasey Date: Fri, 1 Dec 2023 02:02:18 +0100 Subject: [PATCH] remove unneeded make files --- Makefile | 22 -------------- build-release.sh | 74 ------------------------------------------------ 2 files changed, 96 deletions(-) delete mode 100644 Makefile delete mode 100755 build-release.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index 4ee55f43..00000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -DEPS:=iroh.h iroh.go iroh.a - -export CARGO_TARGET_DIR=target - -all: $(DEPS) -.PHONY: all - -# Create a file so that parallel make doesn't call `./install-filcrypto` for -# each of the deps -$(DEPS): .install-iroh ; - -.install-filcrypto: rust - go clean -cache -testcache - ./install-filcrypto - @touch $@ - -clean: - go clean -cache -testcache - rm -rf $(DEPS) .install-iroh - rm -f ./runner - cd rust && cargo clean && cd .. -.PHONY: clean diff --git a/build-release.sh b/build-release.sh deleted file mode 100755 index b2bdd487..00000000 --- a/build-release.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -set -Exeo pipefail - -main() { - if [[ -z "${1}" ]] - then - (>&2 echo '[build-release/main] Error: script requires a build action, e.g. ./build-release.sh [build|lipo]') - exit 1 - fi - - local __action="${1}" - - # temporary place for storing build output (cannot use 'local', because - # 'trap' is not going to have access to variables scoped to this function) - # - __build_output_log_tmp=$(mktemp) - - # clean up temp file on exit - # - trap '{ rm -f $__build_output_log_tmp; }' EXIT - - # build with RUSTFLAGS configured to output linker flags for native libs - # - local __rust_flags="--print native-static-libs ${RUSTFLAGS}" - - # shellcheck disable=SC2068 # the rest of the parameters should be split - RUSTFLAGS="${__rust_flags}" \ - cargo "${__action}" \ - --release --locked ${@:2} 2>&1 | tee ${__build_output_log_tmp} - - # parse build output for linker flags - # - local __linker_flags=$(cat ${__build_output_log_tmp} \ - | grep native-static-libs\: \ - | head -n 1 \ - | cut -d ':' -f 3) - - echo "Linker Flags: ${__linker_flags}" - if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ]; then - # With lipo enabled, this replacement may not be necessary, - # but leaving it in doesn't hurt as it does nothing if not - # needed - __linker_flags=$(echo ${__linker_flags} | sed 's/-lOpenCL/-framework OpenCL/g') - echo "Using Linker Flags: ${__linker_flags}" - - find . -type f -name "libiroh.a" - rm -f ./target/aarch64-apple-darwin/release/libiroh.a - rm -f ./target/x86_64-apple-darwin/release/libiroh.a - echo "Eliminated non-universal binary libraries" - find . -type f -name "libiroh.a" - fi - - # generate iroh.h - # The header files are the same even without having any features enables, - # this reduces the compile time and makes it work on more platforms. - RUSTFLAGS="${__rust_flags}" HEADER_DIR="." \ - cargo test --no-default-features --locked build_headers --features c-headers - - # generate pkg-config - # - sed -e "s;@VERSION@;$(git rev-parse HEAD);" \ - -e "s;@PRIVATE_LIBS@;${__linker_flags};" "iroh.pc.template" > "iroh.pc" - - # ensure header file was built - # - find -L . -type f -name "iroh.h" | read - - # ensure the archive file was built - # - find -L . -type f -name "libiroh.a" | read -} - -main "$@"; exit