From f9bd66779fd08e18be7c703359c2d012220341b4 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Tue, 21 Jun 2016 10:47:57 -0700 Subject: [PATCH] Makefile warning for invalid paths in make_config.mk Summary: Update Makefile to show warnings when we have invalid paths in our make_config.mk file sample output ``` $ make static_lib -j64 Makefile:150: Warning: /mnt/gvfs/third-party2/libgcc/53e0eac8911888a105aa98b9a35fe61cf1d8b278/4.9.x/gcc-4.9-glibc-2.20/024dbc3/libs dont exist Makefile:150: Warning: /mnt/gvfs/third-party2/llvm-fb/b91de48a4974ec839946d824402b098d43454cef/stable/centos6-native/7aaccbe/../../src/clang/tools/scan-build/scan-build dont exist GEN util/build_version.cc ``` Test Plan: check that warning is printed visually Reviewers: sdong, yiwu, andrewkr Reviewed By: andrewkr Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D59523 --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 4fe10b923..9fd74a4eb 100644 --- a/Makefile +++ b/Makefile @@ -138,6 +138,15 @@ dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; "$(CURDIR)/build_tools/build_ include make_config.mk CLEAN_FILES += make_config.mk +missing_make_config_paths := $(shell \ + grep "\/\S*" -o $(CURDIR)/make_config.mk | \ + while read path; \ + do [ -e $$path ] || echo $$path; \ + done | sort | uniq) + +$(foreach path, $(missing_make_config_paths), \ + $(warning Warning: $(path) dont exist)) + ifneq ($(PLATFORM), IOS) CFLAGS += -g CXXFLAGS += -g