From 1e8adc6bd011487ddcc5a6c6cedd51799c0926f2 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 26 Apr 2025 10:59:24 +1200 Subject: [PATCH] Makefile: Redirect all git output For some platforms (Arch Linux, at least), `git status` reports errors on stdout instead of stderr, so we need to redirect that to `/dev/null` too. This also prevents `git status` from logging output when the yosys directory is a git repo, but is missing the abc folder. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2e4db2456..23d91b117 100644 --- a/Makefile +++ b/Makefile @@ -785,7 +785,7 @@ $(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in $(YOSYS_SRC)/Makefile .PHONY: check-git-abc check-git-abc: - @if [ ! -d "$(YOSYS_SRC)/abc" ] && git -C "$(YOSYS_SRC)" status 2>/dev/null; then \ + @if [ ! -d "$(YOSYS_SRC)/abc" ] && git -C "$(YOSYS_SRC)" status >/dev/null 2>&1; then \ echo "Error: The 'abc' directory does not exist."; \ echo "Initialize the submodule: Run 'git submodule update --init' to set up 'abc' as a submodule."; \ exit 1; \ @@ -811,7 +811,7 @@ check-git-abc: echo "3. Initialize the submodule: Run 'git submodule update --init' to set up 'abc' as a submodule."; \ echo "4. Reapply your changes: Move your saved changes back to the 'abc' directory, if necessary."; \ exit 1; \ - elif ! git -C "$(YOSYS_SRC)" status 2>/dev/null; then \ + elif ! git -C "$(YOSYS_SRC)" status >/dev/null 2>&1; then \ echo "$(realpath $(YOSYS_SRC)) is not configured as a git repository, and 'abc' folder is missing."; \ echo "If you already have ABC, set 'ABCEXTERNAL' make variable to point to ABC executable."; \ echo "Otherwise, download release archive 'yosys.tar.gz' from https://github.com/YosysHQ/yosys/releases."; \