test for file existence
authorMichael Wallner <mike@php.net>
Mon, 3 Oct 2016 10:24:05 +0000 (12:24 +0200)
committerMichael Wallner <mike@php.net>
Mon, 3 Oct 2016 10:24:05 +0000 (12:24 +0200)
Makefile

index b07e26dc2a60215aea2c0c11bc16168bc4f6a3a6..28df30942b3fff34ccf63b1a766a8e8d376c894a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ CPPCHECK_STD ?= c89
 CPPCHECK_ENABLE ?= portability,style
 CPPCHECK_EXITCODE ?= 42
 CPPCHECK_SUPPRESSIONS ?= $(makdir)/cppcheck.suppressions
-CPPCHECK_INCLUDES ?= -I. $(shell awk -F= '/^CPPFLAGS|^INCLUDES/{print $$2}' <Makefile)
+CPPCHECK_INCLUDES ?= -I. $(shell test -f Makefile && awk -F= '/^CPPFLAGS|^INCLUDES/{print $$2}' <Makefile)
 CPPCHECK_VERSION ?= 1.75
 CPPCHECK_ARGS ?= -v -j $(JOBS) --std=$(CPPCHECK_STD) --enable=$(CPPCHECK_ENABLE) --error-exitcode=$(CPPCHECK_EXITCODE) --suppressions-list=$(CPPCHECK_SUPPRESSIONS) $(CPPCHECK_INCLUDES)