[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454006512-101675-1-git-send-email-andriy.shevchenko@linux.intel.com>
Date: Thu, 28 Jan 2016 20:41:52 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org,
"Hunter, Adrian" <adrian.hunter@...el.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 1/1] tools/perf: try to make output directory
Instead of just complaining and fail try to create output directory fisrt like
it's done in main Linux kernel Makefile.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
tools/build/Makefile | 2 +-
tools/perf/Makefile | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 0d5a0e3..3f60b67 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -3,7 +3,7 @@ srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
endif
-include $(srctree)/tools//scripts/Makefile.include
+include $(srctree)/tools/scripts/Makefile.include
define allow-override
$(if $(or $(findstring environment,$(origin $(1))),\
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index dcd9a70..4e68eba 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -35,6 +35,9 @@ endif
#
ifneq ($(O),)
FULL_O := $(shell readlink -f $(O) || echo $(O))
+ saved-output := $(FULL_O)
+ FULL_O := $(shell mkdir -p $(FULL_O) && cd $(FULL_O) && /bin/pwd)
+ $(if $(FULL_O),, $(error failed to create output directory "$(saved-output)"))
endif
#
--
2.7.0.rc3
Powered by blists - more mailing lists