Skip to content

Commit

Permalink
Use POSIX-compatible redirection in riscv-tools Makefile
Browse files Browse the repository at this point in the history
The Makefile currently uses &> which works in bash, but not other
shells. On Ubuntu 20.04.6 LTS, `make` uses /bin/sh, which is a symlink
to dash. dash does not support this syntax.

This PR replaces &> with > and 2>&1, which is compatible with both bash
and dash.
  • Loading branch information
jackhumphries committed Dec 2, 2024
1 parent 5528777 commit edc5f24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/riscv-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ define patch_if_new
for p in ${$@_patch}; \
do \
echo "Checking if ${$@_base_patch} is applied..."; \
cd ${$@_src_root}; $(CHECK_PATCH) $$p &> /dev/null && continue; \
cd ${$@_src_root}; $(CHECK_PATCH) $$p > /dev/null 2>&1 && continue; \
echo "Applying unapplied patch to ${$@_src_root};" \
cd ${$@_src_root}; $(APPLY_PATCH) $$p &> /dev/null && continue; \
cd ${$@_src_root}; $(APPLY_PATCH) $$p > /dev/null 2>&1 && continue; \
done
endef

Expand Down

0 comments on commit edc5f24

Please sign in to comment.