linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Arnaldo Carvalho de Melo <acme@infradead.org>,
	Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Tony Luck <tony.luck@intel.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	EDAC devel <linux-edac@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 06/18] tools: Add a toplevel Makefile
Date: Sat, 23 Apr 2011 18:28:08 +0200	[thread overview]
Message-ID: <1303576100-425-7-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1303576100-425-1-git-send-email-bp@amd64.org>

From: Borislav Petkov <borislav.petkov@amd.com>

Add a Makefile with all the targets under tools/. Make perf the default
one and add a minimalistic Makefile to slub/ for completeness.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 tools/Makefile             |   42 ++++++++++++++++++++++++++++++++++++++++++
 tools/scripts/Makefile.lib |   14 ++++++++++++--
 tools/slub/Makefile        |    4 ++++
 3 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 tools/Makefile
 create mode 100644 tools/slub/Makefile

diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 0000000..74b20a9
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,42 @@
+include scripts/Makefile.lib
+
+PERF_TOP_DIR := $(CURDIR)
+export PERF_TOP_DIR
+
+BASIC_CFLAGS = -I$(CURDIR)/lib
+
+# temporary for lib/trace/
+BASIC_CFLAGS += -I$(CURDIR)/perf/util/include
+export BASIC_CFLAGS
+
+perf: .FORCE
+	$(QUIET_SUBDIR0)perf/ $(QUIET_SUBDIR1)
+
+firewire: .FORCE
+	$(QUIET_SUBDIR0)firewire/ $(QUIET_SUBDIR1)
+
+slabinfo: .FORCE
+	$(QUIET_SUBDIR0)slub/ $(QUIET_SUBDIR1)
+
+turbostat: .FORCE
+	$(QUIET_SUBDIR0)power/x86/turbostat/ $(QUIET_SUBDIR1)
+
+usb: .FORCE
+	$(QUIET_SUBDIR0)usb/ $(QUIET_SUBDIR1)
+
+virtio: .FORCE
+	$(QUIET_SUBDIR0)virtio/ $(QUIET_SUBDIR1)
+
+x86_energy: .FORCE
+	$(QUIET_SUBDIR0)power/x86/x86_energy_perf_policy/ $(QUIET_SUBDIR1)
+
+clean:
+	$(QUIET_SUBDIR0)perf/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)firewire/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)slub/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)power/x86/turbostat/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)usb/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)virtio/ $(QUIET_SUBDIR1) clean
+	$(QUIET_SUBDIR0)power/x86/x86_energy_perf_policy/ $(QUIET_SUBDIR1) clean
+
+.PHONY: clean .FORCE
diff --git a/tools/scripts/Makefile.lib b/tools/scripts/Makefile.lib
index 854fefb..9dfa0f9 100644
--- a/tools/scripts/Makefile.lib
+++ b/tools/scripts/Makefile.lib
@@ -33,6 +33,15 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition
 EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes
 EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement
 
+QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
+QUIET_SUBDIR1  =
+
+ifneq ($(findstring $(MAKEFLAGS),w),w)
+PRINT_DIR = --no-print-directory
+else # "make -w"
+NO_SUBDIR = :
+endif
+
 ifneq ($(findstring $(MAKEFLAGS),s),s)
 ifndef V
 	QUIET_CC       = @echo '   ' CC $@;
@@ -40,7 +49,8 @@ ifndef V
 	QUIET_LINK     = @echo '   ' LINK $@;
 	QUIET_MKDIR    = @echo '   ' MKDIR $@;
 	QUIET_GEN      = @echo '   ' GEN $@;
+	QUIET_SUBDIR0  = +@subdir=
+	QUIET_SUBDIR1  = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
+			$(MAKE) $(PRINT_DIR) -C $$subdir
 endif
 endif
-
-
diff --git a/tools/slub/Makefile b/tools/slub/Makefile
new file mode 100644
index 0000000..b2cf6b4
--- /dev/null
+++ b/tools/slub/Makefile
@@ -0,0 +1,4 @@
+slabinfo: slabinfo.c
+
+clean:
+	rm -rf slabinfo
-- 
1.7.4.rc2


  parent reply	other threads:[~2011-04-23 16:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23 16:28 [PATCH 00/18] RAS daemon: Easter Eggs Edition Borislav Petkov
2011-04-23 16:28 ` [PATCH 01/18] perf: Start the restructuring Borislav Petkov
2011-04-23 16:28 ` [PATCH 02/18] perf: Add persistent event facilities Borislav Petkov
2011-04-26 10:57   ` Peter Zijlstra
2011-04-26 12:45     ` Ingo Molnar
2011-04-26 14:05       ` Borislav Petkov
2011-04-23 16:28 ` [PATCH 03/18] x86, mce: Add persistent MCE event Borislav Petkov
2011-04-23 16:28 ` [PATCH 04/18] x86, mce: Have MCE persistent event off by default for now Borislav Petkov
2011-04-23 16:28 ` [PATCH 05/18] perf: Add Makefile.lib Borislav Petkov
2011-04-23 16:28 ` Borislav Petkov [this message]
2011-04-23 16:28 ` [PATCH 07/18] perf: Export trace-event utils Borislav Petkov
2011-04-23 16:28 ` [PATCH 08/18] perf: Remove duplicate enum trace_flag_type Borislav Petkov
2011-04-23 16:28 ` [PATCH 09/18] perf: Drop redundant FD macro definitions Borislav Petkov
2011-07-25 15:04   ` Arnaldo Carvalho de Melo
2011-04-23 16:28 ` [PATCH 10/18] perf: Export debugfs utilities Borislav Petkov
2011-04-23 16:28 ` [PATCH 11/18] perf: Export cpumap.[ch] Borislav Petkov
2011-04-23 16:28 ` [PATCH 12/18] perf: Export thread_map.[ch] Borislav Petkov
2011-04-23 16:28 ` [PATCH 13/18] perf: Export evsel.[ch] Borislav Petkov
2011-04-23 16:28 ` [PATCH 14/18] perf: Export cgroup.[ch] Borislav Petkov
2011-04-23 16:28 ` [PATCH 15/18] perf: Export evlist.[ch] Borislav Petkov
2011-04-23 16:28 ` [PATCH 16/18] perf: Export ctype.c Borislav Petkov
2011-04-23 16:28 ` [PATCH 17/18] perf: Export tracepoint_id_to_path Borislav Petkov
2011-04-23 16:28 ` [PATCH 18/18] ras: Add RAS daemon Borislav Petkov
2011-04-29 14:08 ` [PATCH 00/18] RAS daemon: Easter Eggs Edition Frederic Weisbecker
2011-04-29 14:25   ` Borislav Petkov
2011-04-29 14:31     ` Ingo Molnar
2011-04-29 17:35       ` Arnaldo Carvalho de Melo
2011-04-29 14:39   ` Steven Rostedt

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=1303576100-425-7-git-send-email-bp@amd64.org \
    --to=bp@amd64.org \
    --cc=acme@infradead.org \
    --cc=borislav.petkov@amd.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tony.luck@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).