[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 22/23] instrument: Install headers for dynamic in
From: |
Lluís Vilanova |
Subject: |
[Qemu-devel] [PATCH v2 22/23] instrument: Install headers for dynamic instrumentation clients |
Date: |
Tue, 16 Apr 2013 15:51:56 +0200 |
User-agent: |
StGit/0.16 |
Signed-off-by: Lluís Vilanova <address@hidden>
---
Makefile | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index ccf6760..3fc5fb6 100644
--- a/Makefile
+++ b/Makefile
@@ -324,7 +324,29 @@ install-confdir:
install-sysconfig: install-datadir install-confdir
$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf
"$(DESTDIR)$(qemu_confdir)"
-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
+install_instrument_find=$(shell find $(1)/instrument/qemu-instr -type f -name
\*.h)
+
+install-instrument: INSTALL_FILES =$(call install_instrument_find,$(SRC_PATH))
+install-instrument: INSTALL_FILES+=$(call install_instrument_find,$(BUILD_DIR))
+install-instrument: INSTALL_DIRS:=$(dir $(INSTALL_FILES))
+install-instrument: INSTALL_DIRS:=$(patsubst
$(SRC_PATH)/instrument/%,$(DESTDIR)$(includedir)/%,$(INSTALL_DIRS))
+install-instrument: INSTALL_DIRS:=$(patsubst
$(BUILD_DIR)/instrument/%,$(DESTDIR)$(includedir)/%,$(INSTALL_DIRS))
+install-instrument: INSTALL_DIRS:=$(sort $(INSTALL_DIRS))
+install-instrument:
+ @for d in $(INSTALL_DIRS); do \
+ echo "$(INSTALL_DIR) \"$$d\""; \
+ $(INSTALL_DIR) "$$d"; \
+ done
+ @for f in $(INSTALL_FILES); do \
+ echo "$(INSTALL_DATA) \"$$f\"
\"$(DESTDIR)$(includedir)/qemu-instr/$${f##*qemu-instr/}\""; \
+ $(INSTALL_DATA) "$$f"
"$(DESTDIR)$(includedir)/qemu-instr/$${f##*qemu-instr/}"; \
+ done
+
+ifdef CONFIG_TRACE_INSTRUMENT_DYNAMIC
+INSTALL_INSTRUMENT=install-instrument
+endif
+
+install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
$(INSTALL_INSTRUMENT)
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
$(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
- [Qemu-devel] [RFC][PATCH v2 00/23] instrument: Let the user wrap/override specific event tracing routines, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 21/23] build: Fix installation of target-dependant files, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 22/23] instrument: Install headers for dynamic instrumentation clients,
Lluís Vilanova <=
- [Qemu-devel] [PATCH v2 20/23] instrument: Add client-side API to control event instrumentation, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 19/23] instrument: Add client-side API to control tracing state of events, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 18/23] instrument: Add client-side API to enumerate events, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 09/23] build: Add variable 'tools-obj-y' for tool-only files, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 08/23] instrument: [static] Call statically linked user-provided routines, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 07/23] system: [linux] Use absolute include path for linux-headers, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 06/23] instrument: [none] Add null instrumentation, Lluís Vilanova, 2013/04/16