aboutsummaryrefslogtreecommitdiffstats
path: root/testing/crystal/fix-makefile-stderr-redirect.patch
blob: 5c5ccb925b6123fb9d1b8ad804f8f0c9a248eb44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 2d5bc81866affe7a625da96161644d17c50cf675 Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sat, 24 Mar 2018 18:15:46 +0100
Subject: [PATCH] Makefile: Fix redirect to stderr to be more portable

`>/dev/stderr` does not work in some environments. Moreover, all POSIX
compliant shells supports standard `>&2` for redirect stdout to stderr.

Upstream-Issue: https://github.com/crystal-lang/crystal/pull/5859
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2aa2e4f..a034f44 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ CXXFLAGS += $(if $(debug),-g -O0)
 ifeq (${LLVM_CONFIG},)
   $(error Could not locate llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG)
 else
-  $(shell echo $(shell printf '\033[33m')Using $(LLVM_CONFIG) [version=$(shell $(LLVM_CONFIG) --version)]$(shell printf '\033[0m') >/dev/stderr)
+  $(shell echo $(shell printf '\033[33m')Using $(LLVM_CONFIG) [version=$(shell $(LLVM_CONFIG) --version)]$(shell printf '\033[0m') >&2)
 endif
 
 .PHONY: all
-- 
2.10.1 (Apple Git-78)