From 33947b2f46d900774f5cd03cfe89358e99d4eb88 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Mon, 8 Nov 2021 10:44:02 +0100 Subject: [PATCH] Makefile: test for tool build errors --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 719166a..957a7e7 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,11 @@ DSCEXTRACTOR = $(shell nix build --no-write-lock-file .\#dsc-extractor && \ readlink result && rm result)/bin/dyld-shared-cache-extractor dyld: /System/Library/dyld/dyld_shared_cache_$(shell uname -m) /System/DriverKit/System/Library/dyld/dyld_shared_cache_$(shell uname -m) + if ! test -x $(DSCEXTRACTOR) ; then \ + printf '\033[1mdscextractor tool unavailable\033[m\n' >&2 ; \ + echo 'FAIL;' ; \ + exit 1 ; \ + fi for i in $+ ; do $(DSCEXTRACTOR) $$i $@ ; done > /dev/null find $@ -type f -print0 | xargs -0 chmod a+x @@ -131,6 +136,11 @@ db_manifests:: done db_assets:: + if ! test -x $(ACEXTRACT) ; then \ + printf '\033[1macextract tool unavailable\033[m\n' >&2 ; \ + echo 'FAIL;' ; \ + exit 1 ; \ + fi printf '\033[1mcollecting asset catalog information...\033[m\n' >&2 echo 'DROP TABLE IF EXISTS assets;' echo 'CREATE TABLE assets (id INTEGER REFERENCES files, name TEXT);'