All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH 15/16] perf python: Make sure the python binding output directory is in place
Date: Fri,  4 Jan 2019 15:33:36 -0300	[thread overview]
Message-ID: <20190104183337.12771-16-acme@kernel.org> (raw)
In-Reply-To: <20190104183337.12771-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Instead of doing an unconditional mkdir, use a dummy Makefile variable
to check if the directory is there and if not, create it.

This is better than what we had and will help with other python bindings
that are in development, like one involved with python backtraces.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-iis6us2nocw3y4uuoon9osd7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index ff29c3372ec3..2921f829a0f4 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -524,12 +524,14 @@ $(arch_errno_name_array): $(arch_errno_tbl)
 
 all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
 
+# Create python binding output directory if not already present
+_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
+
 $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
 	$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
         CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
 	  $(PYTHON_WORD) util/setup.py \
 	  --quiet build_ext; \
-	mkdir -p $(OUTPUT)python && \
 	cp $(PYTHON_EXTBUILD_LIB)perf*.so $(OUTPUT)python/
 
 please_set_SHELL_PATH_to_a_more_modern_shell:
-- 
2.20.1


  parent reply	other threads:[~2019-01-04 18:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 18:33 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 01/16] perf stat: Fix endless wait for child process Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 02/16] tools headers x86: Sync disabled-features.h Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 03/16] tools headers uapi: Sync prctl.h with the kernel sources Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 04/16] tools beauty: Make the prctl option table generator catch all PR_ options Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 05/16] tools thermal tmon: Use -O3 instead of -O1 if available Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 06/16] tools iio: Override CFLAGS assignments Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 07/16] tools headers uapi: Update i915_drm.h Arnaldo Carvalho de Melo
2019-01-07 10:53   ` Joonas Lahtinen
2019-01-07 10:53     ` Joonas Lahtinen
2019-01-04 18:33 ` [PATCH 08/16] tools headers uapi: Sync linux/in.h copy from the kernel sources Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 09/16] tools headers uapi: Sync linux/kvm.h with " Arnaldo Carvalho de Melo
2019-01-05 16:04   ` Paolo Bonzini
2019-01-04 18:33 ` [PATCH 10/16] tools headers uapi: Sync copy of asm-generic/unistd.h " Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 11/16] tools headers x86: Sync asm/cpufeatures.h copy " Arnaldo Carvalho de Melo
2019-01-05 16:06   ` Paolo Bonzini
2019-01-04 18:33 ` [PATCH 12/16] perf report: Fix wrong iteration count in --branch-history Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 13/16] perf annotate: Pass filename to objdump via execl Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 14/16] perf strbuf: Remove redundant va_end() in strbuf_addv() Arnaldo Carvalho de Melo
2019-01-04 18:33 ` Arnaldo Carvalho de Melo [this message]
2019-01-04 18:33 ` [PATCH 16/16] perf test shell: Use a fallback to get the pathname in vfs_getname Arnaldo Carvalho de Melo
2019-01-08 15:32 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104183337.12771-16-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.