From: Rudolf Polzer Date: Sat, 18 Dec 2010 21:40:31 +0000 (+0100) Subject: be more specific about depcheck errors (show whether compile or link stage failed) X-Git-Tag: xonotic-v0.5.0~115 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=af702de039d54120381432225a9f604f80e6ef90;p=xonotic%2Fnetradiant.git be more specific about depcheck errors (show whether compile or link stage failed) --- diff --git a/Makefile b/Makefile index a300b6af..6319795c 100644 --- a/Makefile +++ b/Makefile @@ -304,11 +304,20 @@ dependencies-check: { \ $(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 >&3 $(STDERR_TO_STDOUT) && \ - $(CXX) conftest.o $(LDFLAGS) $(LDFLAGS_COMMON) $$5 $(LIBS_COMMON) $(LIBS) -o conftest >&3 $(STDERR_TO_STDOUT); \ + $(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); \ then \ - $(RM) conftest conftest.o conftest.d; \ - $(ECHO) "found."; \ + if \ + $(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 and links."; \ + else \ + $(RM) conftest.o conftest.d; \ + $(ECHO) "found but does not link, please install it or set PKG_CONFIG_PATH right!"; \ + $(ECHO) "To see the failed commands, set DEPENDENCIES_CHECK=verbose"; \ + $(ECHO) "To proceed anyway, set DEPENDENCIES_CHECK=off"; \ + failed=1; \ + fi; \ else \ $(RM) conftest conftest.o conftest.d; \ $(ECHO) "not found, please install it or set PKG_CONFIG_PATH right!"; \