From: Rudolf Polzer Date: Tue, 16 Nov 2010 13:06:41 +0000 (+0100) Subject: makefile: make verbose dep check more verbose X-Git-Tag: xonotic-v0.5.0~151 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=08f58dfd1f1ed5e9d52afe442863bb56b788a220;p=xonotic%2Fnetradiant.git makefile: make verbose dep check more verbose --- diff --git a/Makefile b/Makefile index 4dad4180..bb2f743c 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,9 @@ WGET ?= wget MV ?= mv UNZIP ?= unzip -STDOUT_TO_DEVNULL ?= >/dev/null -STDERR_TO_DEVNULL ?= 2>/dev/null +FD_TO_DEVNULL ?= >/dev/null +STDOUT_TO_DEVNULL ?= 1$(FD_TO_DEVNULL) +STDERR_TO_DEVNULL ?= 2$(FD_TO_DEVNULL) STDERR_TO_STDOUT ?= 2>&1 TO_DEVNULL ?= $(STDOUT_TO_DEVNULL) $(STDERR_TO_STDOUT) @@ -250,12 +251,12 @@ dependencies-check: else dependencies-check: @$(ECHO) - @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \ + @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; exec 3>&2; else exec 3$(FD_TO_DEVNULL); fi; \ failed=0; \ checkbinary() \ { \ $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \ - $$2 --help $(TO_DEVNULL); \ + $$2 --help >&3 $(STDERR_TO_STDOUT); \ if [ $$? != 127 ]; then \ $(ECHO) "found."; \ else \ @@ -294,14 +295,14 @@ dependencies-check: [ -n "$(OTOOL)" ] && checkbinary xcode "$(OTOOL)"; \ [ "$$failed" = "0" ] && $(ECHO) All required tools have been found! @$(ECHO) - @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \ + @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; exec 3>&2; else exec 3$(FD_TO_DEVNULL); fi; \ failed=0; \ checkheader() \ { \ $(ECHO_NOLF) "Checking for $$2 ($$1)... "; \ if \ - $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o $(TO_DEVNULL) && \ - $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest $(TO_DEVNULL); \ + $(CXX) conftest.cpp $(CFLAGS) $(CXXFLAGS) $(CFLAGS_COMMON) $(CXXFLAGS_COMMON) $(CPPFLAGS) $(CPPFLAGS_COMMON) $$4 -DCONFTEST_HEADER="<$$2>" -DCONFTEST_SYMBOL="$$3" $(TARGET_ARCH) $(LDFLAGS) -c -o conftest.o >&3 $(STDERR_TO_STDOUT) && \ + $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest >&3 $(STDERR_TO_STDOUT); \ then \ $(RM) conftest conftest.o conftest.d; \ $(ECHO) "found."; \