Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290826 > unrolled thread

[PATCH v3 00/17] perf tools: Move perf subcommand framework to a library

Started byJosh Poimboeuf <jpoimboe@redhat.com>
First post2015-12-14 05:20 +0100
Last post2015-12-14 19:10 +0100
Articles 20 on this page of 47 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 00/17] perf tools: Move perf subcommand framework to a library Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
    [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
      Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:40 +0100
        Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
      [tip:perf/core] perf build: Rename LIB_PATH -> API_PATH tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
    [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
      Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies  for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:10 +0100
        Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies  for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:10 +0100
          [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies  for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:30 +0100
            Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile  dependencies for 'O=' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
            Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile  dependencies for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 16:30 +0100
              Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile  dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 16:40 +0100
                Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile  dependencies for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 17:00 +0100
                  Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile  dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 17:10 +0100
                  [PATCH v3.2] tools build: Fix feature Makefile issues with 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 19:40 +0100
    [PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
      [tip:perf/core] perf tools:   Remove check for unused PERF_PAGER_IN_USE tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
    [PATCH v3 05/17] perf build: Fix 'make clean' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      Re: [PATCH v3 05/17] perf build: Fix 'make clean' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:20 +0100
        Re: [PATCH v3 05/17] perf build: Fix 'make clean' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
      [tip:perf/core] perf build: Fix 'make clean' tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
    [PATCH v3 13/17] perf: Document the fact that parse_options*() may exit Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
    [PATCH v3 09/17] perf: Move help_unknown_cmd() to its own file Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      [tip:perf/core] perf tools: Move help_unknown_cmd()   to its own file tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
    [PATCH v3 12/17] perf: Convert parse-options.c internal functions to static Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      [tip:perf/core] perf tools:   Convert parse-options.c internal functions to static tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
    [PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      Re: [PATCH v3 01/17] perf build: Remove unnecessary line in  Makefile.feature Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:10 +0100
        Re: [PATCH v3 01/17] perf build: Remove unnecessary line in  Makefile.feature Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
      [tip:perf/core] perf build:   Remove unnecessary line in Makefile.feature tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
    [PATCH v3 17/17] tools subcmd: Rename subcmd header include guards Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
    [PATCH v3 15/17] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      Re: [PATCH v3 15/17] perf: Finalize subcmd independence Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:40 +0100
        Re: [PATCH v3 15/17] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:20 +0100
          Re: [PATCH v3 15/17] perf: Finalize subcmd independence Jiri Olsa <jolsa@redhat.com> - 2015-12-14 16:30 +0100
          Re: [PATCH v3 15/17] perf: Finalize subcmd independence Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 17:00 +0100
    [PATCH v3 11/17] perf: Remove 'perf' from subcmd function and variable names Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
    [PATCH v3 16/17] perf subcmd: Create subcmd library Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
    [PATCH v3 04/17] perf test: remove tarpkg at end of test Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      [tip:perf/core] perf test: Remove tarpkg at end of test tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
    [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
      Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:30 +0100
        Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:20 +0100
      Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:50 +0100
        Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 17:10 +0100
          Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 19:00 +0100
            Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 19:10 +0100

Page 1 of 3  [1] 2 3  Next page →


#1290826 — [PATCH v3 00/17] perf tools: Move perf subcommand framework to a library

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 05:20 +0100
Subject[PATCH v3 00/17] perf tools: Move perf subcommand framework to a library
Message-ID<qFsMa-14g-3@gated-at.bofh.it>
Ingo suggested that I factor out the perf subcommand functionality
(originally copied from git) into tools/lib so that it can be used by
stacktool[*] and possibly others.

All the subcommand option handling files have been moved into a new
library named libsubcmd.a, including parse-options.c, run-command.c,
exec_cmd.c, help.c, usage.c, and pager.c.

Patches 1-6 are some assorted cleanups I discovered in the process of
making the patch set.  They're completely separate from the rest of the
patches and can be merged independently.

Patches 7-15 are some cleanups and splitting up of the code related to
the creation of the new library.

Patch 16 does the actual moving of the files and creation of the new
libsubcmd.a library in tools/lib/subcmd.

Patch 17 updates the header guards for the moved .h files.

Based on acme/perf/core.

These patches can also be found in the 'perf-subcmd-v3' branch in the
following repo:

  https://github.com/jpoimboe/linux


[*] https://lkml.kernel.org/r/cover.1445443144.git.jpoimboe@redhat.com

v3:
- Remove dependencies on util.h, cache.h, abspath, ctype, strbuf, term,
  usage, wrapper
- Move to a new 'libsubcmd' library in tools/lib/subcmd
- Rebase onto Namhyung's patches which remove the browser dependency
  from parse-options.c
- Get rid of the util_cfg struct in favor of file-specific init
  functions
- Split up the patches better
- Document the fact that parse_options*() can exit
- Convert parse-options.c internal functions to static
- Rename exec_cmd.* to exec-cmd.*
- Add new astrcat() and astrcatf() functions to replace strbuf
- Add some more fixes related to 'make O=' and 'make clean' (though
  a 'make clean' is no longer required and these patches are now
  unrelated to libsubcmd)

v2:
- Fix 'make clean' to remove tests/llvm-src-*.c and other leftover
  files
- Fix description for second-to-last patch

Josh Poimboeuf (17):
  perf build: Remove unnecessary line in Makefile.feature
  tools build: Fix feature Makefile dependencies for 'O='
  perf test: Add Build file to dependencies for llvm-src-*.c
  perf test: remove tarpkg at end of test
  perf build: Fix 'make clean'
  perf build: Rename LIB_PATH -> API_PATH
  perf: Create pager.h
  perf: Remove check for unused PERF_PAGER_IN_USE
  perf: Move help_unknown_cmd() to its own file
  perf: Provide subcmd configuration at runtime
  perf: Remove 'perf' from subcmd function and variable names
  perf: Convert parse-options.c internal functions to static
  perf: Document the fact that parse_options*() may exit
  perf: Remove subcmd dependencies on strbuf
  perf: Finalize subcmd independence
  perf subcmd: Create subcmd library
  tools subcmd: Rename subcmd header include guards

 tools/build/Makefile.feature                    |   3 +-
 tools/build/feature/Makefile                    |  95 +++++-----
 tools/lib/subcmd/Build                          |   6 +
 tools/lib/subcmd/Makefile                       |  48 +++++
 tools/lib/subcmd/exec-cmd.c                     | 227 ++++++++++++++++++++++++
 tools/lib/subcmd/exec-cmd.h                     |  16 ++
 tools/{perf/util => lib/subcmd}/help.c          | 170 ++++++------------
 tools/{perf/util => lib/subcmd}/help.h          |  13 +-
 tools/{perf/util => lib/subcmd}/pager.c         |  24 ++-
 tools/lib/subcmd/pager.h                        |   9 +
 tools/{perf/util => lib/subcmd}/parse-options.c | 134 ++++++++------
 tools/{perf/util => lib/subcmd}/parse-options.h |  23 ++-
 tools/{perf/util => lib/subcmd}/run-command.c   |  24 ++-
 tools/{perf/util => lib/subcmd}/run-command.h   |  12 +-
 tools/{perf/util => lib/subcmd}/sigchain.c      |   3 +-
 tools/{perf/util => lib/subcmd}/sigchain.h      |   6 +-
 tools/lib/subcmd/subcmd-util.h                  |  91 ++++++++++
 tools/perf/Build                                |   5 +-
 tools/perf/MANIFEST                             |   1 +
 tools/perf/Makefile.perf                        |  35 ++--
 tools/perf/arch/x86/util/intel-pt.c             |   2 +-
 tools/perf/bench/futex-hash.c                   |   2 +-
 tools/perf/bench/futex-lock-pi.c                |   2 +-
 tools/perf/bench/futex-requeue.c                |   2 +-
 tools/perf/bench/futex-wake-parallel.c          |   2 +-
 tools/perf/bench/futex-wake.c                   |   2 +-
 tools/perf/bench/mem-functions.c                |   2 +-
 tools/perf/bench/numa.c                         |   2 +-
 tools/perf/bench/sched-messaging.c              |   2 +-
 tools/perf/bench/sched-pipe.c                   |   2 +-
 tools/perf/builtin-annotate.c                   |   2 +-
 tools/perf/builtin-bench.c                      |   2 +-
 tools/perf/builtin-buildid-cache.c              |   2 +-
 tools/perf/builtin-buildid-list.c               |   2 +-
 tools/perf/builtin-config.c                     |   2 +-
 tools/perf/builtin-data.c                       |   2 +-
 tools/perf/builtin-evlist.c                     |   2 +-
 tools/perf/builtin-help.c                       |  10 +-
 tools/perf/builtin-inject.c                     |   2 +-
 tools/perf/builtin-kmem.c                       |   2 +-
 tools/perf/builtin-kvm.c                        |   2 +-
 tools/perf/builtin-list.c                       |   2 +-
 tools/perf/builtin-lock.c                       |   2 +-
 tools/perf/builtin-mem.c                        |   2 +-
 tools/perf/builtin-probe.c                      |   2 +-
 tools/perf/builtin-record.c                     |   2 +-
 tools/perf/builtin-report.c                     |   2 +-
 tools/perf/builtin-sched.c                      |   2 +-
 tools/perf/builtin-script.c                     |  12 +-
 tools/perf/builtin-stat.c                       |   2 +-
 tools/perf/builtin-timechart.c                  |   2 +-
 tools/perf/builtin-top.c                        |   2 +-
 tools/perf/builtin-trace.c                      |   4 +-
 tools/perf/perf.c                               |  19 +-
 tools/perf/tests/Build                          |   6 +-
 tools/perf/tests/attr.c                         |   4 +-
 tools/perf/tests/builtin-test.c                 |   2 +-
 tools/perf/tests/make                           |   3 +-
 tools/perf/util/Build                           |   8 +-
 tools/perf/util/auxtrace.c                      |   2 +-
 tools/perf/util/cache.h                         |   6 +-
 tools/perf/util/cgroup.c                        |   2 +-
 tools/perf/util/config.c                        |   2 +-
 tools/perf/util/evlist.c                        |   2 +-
 tools/perf/util/exec_cmd.c                      | 149 ----------------
 tools/perf/util/exec_cmd.h                      |  13 --
 tools/perf/util/help-unknown-cmd.c              | 103 +++++++++++
 tools/perf/util/help-unknown-cmd.h              |   0
 tools/perf/util/parse-branch-options.c          |   2 +-
 tools/perf/util/parse-events.c                  |   4 +-
 tools/perf/util/parse-regs-options.c            |   2 +-
 tools/perf/util/sort.h                          |   2 +-
 tools/perf/util/util.h                          |  14 --
 73 files changed, 848 insertions(+), 528 deletions(-)
 create mode 100644 tools/lib/subcmd/Build
 create mode 100644 tools/lib/subcmd/Makefile
 create mode 100644 tools/lib/subcmd/exec-cmd.c
 create mode 100644 tools/lib/subcmd/exec-cmd.h
 rename tools/{perf/util => lib/subcmd}/help.c (58%)
 rename tools/{perf/util => lib/subcmd}/help.h (73%)
 rename tools/{perf/util => lib/subcmd}/pager.c (84%)
 create mode 100644 tools/lib/subcmd/pager.h
 rename tools/{perf/util => lib/subcmd}/parse-options.c (87%)
 rename tools/{perf/util => lib/subcmd}/parse-options.h (95%)
 rename tools/{perf/util => lib/subcmd}/run-command.c (90%)
 rename tools/{perf/util => lib/subcmd}/run-command.h (86%)
 rename tools/{perf/util => lib/subcmd}/sigchain.c (95%)
 rename tools/{perf/util => lib/subcmd}/sigchain.h (55%)
 create mode 100644 tools/lib/subcmd/subcmd-util.h
 delete mode 100644 tools/perf/util/exec_cmd.c
 delete mode 100644 tools/perf/util/exec_cmd.h
 create mode 100644 tools/perf/util/help-unknown-cmd.c
 create mode 100644 tools/perf/util/help-unknown-cmd.h

-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1290828 — [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 05:20 +0100
Subject[PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH
Message-ID<qFsMa-14g-11@gated-at.bofh.it>
In reply to#1290826
'LIB_PATH' is a misnomer because there are multiple library paths.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/perf/Makefile.perf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 906c723..388ec64 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -185,13 +185,13 @@ ifneq ($(OUTPUT),)
   TE_PATH=$(OUTPUT)
   BPF_PATH=$(OUTPUT)
 ifneq ($(subdir),)
-  LIB_PATH=$(OUTPUT)/../lib/api/
+  API_PATH=$(OUTPUT)/../lib/api/
 else
-  LIB_PATH=$(OUTPUT)
+  API_PATH=$(OUTPUT)
 endif
 else
   TE_PATH=$(TRACE_EVENT_DIR)
-  LIB_PATH=$(LIB_DIR)
+  API_PATH=$(LIB_DIR)
   BPF_PATH=$(BPF_DIR)
 endif
 
@@ -201,7 +201,7 @@ export LIBTRACEEVENT
 LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
 LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
 
-LIBAPI = $(LIB_PATH)libapi.a
+LIBAPI = $(API_PATH)libapi.a
 export LIBAPI
 
 LIBBPF = $(BPF_PATH)libbpf.a
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291076 — Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-14 11:40 +0100
SubjectRe: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH
Message-ID<qFyHU-4U5-25@gated-at.bofh.it>
In reply to#1290828
On Sun, Dec 13, 2015 at 10:18:06PM -0600, Josh Poimboeuf wrote:
> 'LIB_PATH' is a misnomer because there are multiple library paths.
> 
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/Makefile.perf | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 906c723..388ec64 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -185,13 +185,13 @@ ifneq ($(OUTPUT),)
>    TE_PATH=$(OUTPUT)
>    BPF_PATH=$(OUTPUT)
>  ifneq ($(subdir),)
> -  LIB_PATH=$(OUTPUT)/../lib/api/
> +  API_PATH=$(OUTPUT)/../lib/api/
>  else
> -  LIB_PATH=$(OUTPUT)
> +  API_PATH=$(OUTPUT)
>  endif
>  else
>    TE_PATH=$(TRACE_EVENT_DIR)
> -  LIB_PATH=$(LIB_DIR)
> +  API_PATH=$(LIB_DIR)
>    BPF_PATH=$(BPF_DIR)
>  endif
>  
> @@ -201,7 +201,7 @@ export LIBTRACEEVENT
>  LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
>  LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
>  
> -LIBAPI = $(LIB_PATH)libapi.a
> +LIBAPI = $(API_PATH)libapi.a
>  export LIBAPI
>  
>  LIBBPF = $(BPF_PATH)libbpf.a
> -- 
> 2.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291268 — Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-14 16:20 +0100
SubjectRe: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH
Message-ID<qFD4T-7Rv-41@gated-at.bofh.it>
In reply to#1291076
Em Mon, Dec 14, 2015 at 11:34:42AM +0100, Jiri Olsa escreveu:
> On Sun, Dec 13, 2015 at 10:18:06PM -0600, Josh Poimboeuf wrote:
> > 'LIB_PATH' is a misnomer because there are multiple library paths.
> > 
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Applied.
 
> thanks,
> jirka
> 
> > ---
> >  tools/perf/Makefile.perf | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > index 906c723..388ec64 100644
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@ -185,13 +185,13 @@ ifneq ($(OUTPUT),)
> >    TE_PATH=$(OUTPUT)
> >    BPF_PATH=$(OUTPUT)
> >  ifneq ($(subdir),)
> > -  LIB_PATH=$(OUTPUT)/../lib/api/
> > +  API_PATH=$(OUTPUT)/../lib/api/
> >  else
> > -  LIB_PATH=$(OUTPUT)
> > +  API_PATH=$(OUTPUT)
> >  endif
> >  else
> >    TE_PATH=$(TRACE_EVENT_DIR)
> > -  LIB_PATH=$(LIB_DIR)
> > +  API_PATH=$(LIB_DIR)
> >    BPF_PATH=$(BPF_DIR)
> >  endif
> >  
> > @@ -201,7 +201,7 @@ export LIBTRACEEVENT
> >  LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
> >  LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
> >  
> > -LIBAPI = $(LIB_PATH)libapi.a
> > +LIBAPI = $(API_PATH)libapi.a
> >  export LIBAPI
> >  
> >  LIBBPF = $(BPF_PATH)libbpf.a
> > -- 
> > 2.4.3
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1294504 — [tip:perf/core] perf build: Rename LIB_PATH -> API_PATH

Fromtip-bot for Josh Poimboeuf <tipbot@zytor.com>
Date2015-12-18 09:50 +0100
Subject[tip:perf/core] perf build: Rename LIB_PATH -> API_PATH
Message-ID<qGYTD-3jm-5@gated-at.bofh.it>
In reply to#1290828
Commit-ID:  212e984a07d19c2e6b83da4ebac4e965dd92efd3
Gitweb:     http://git.kernel.org/tip/212e984a07d19c2e6b83da4ebac4e965dd92efd3
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Sun, 13 Dec 2015 22:18:06 -0600
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Dec 2015 12:19:03 -0300

perf build: Rename LIB_PATH -> API_PATH

'LIB_PATH' is a misnomer because there are multiple library paths.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/c10df0b749a27f05cc531fe06b8dd71a329341fa.1449965119.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 906c723..388ec64 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -185,13 +185,13 @@ ifneq ($(OUTPUT),)
   TE_PATH=$(OUTPUT)
   BPF_PATH=$(OUTPUT)
 ifneq ($(subdir),)
-  LIB_PATH=$(OUTPUT)/../lib/api/
+  API_PATH=$(OUTPUT)/../lib/api/
 else
-  LIB_PATH=$(OUTPUT)
+  API_PATH=$(OUTPUT)
 endif
 else
   TE_PATH=$(TRACE_EVENT_DIR)
-  LIB_PATH=$(LIB_DIR)
+  API_PATH=$(LIB_DIR)
   BPF_PATH=$(BPF_DIR)
 endif
 
@@ -201,7 +201,7 @@ export LIBTRACEEVENT
 LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
 LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
 
-LIBAPI = $(LIB_PATH)libapi.a
+LIBAPI = $(API_PATH)libapi.a
 export LIBAPI
 
 LIBBPF = $(BPF_PATH)libbpf.a
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290829 — [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 05:20 +0100
Subject[PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFsMa-14g-13@gated-at.bofh.it>
In reply to#1290826
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/build/Makefile.feature |  2 +-
 tools/build/feature/Makefile | 95 ++++++++++++++++++++++----------------------
 2 files changed, 49 insertions(+), 48 deletions(-)

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index b8c31ec..6c0519d 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -7,7 +7,7 @@ endif
 
 feature_check = $(eval $(feature_check_code))
 define feature_check_code
-  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
+  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
 endef
 
 feature_set = $(eval $(feature_set_code))
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index cea04ce9..8fec49d 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -1,4 +1,3 @@
-
 FILES=					\
 	test-all.bin			\
 	test-backtrace.bin		\
@@ -38,38 +37,40 @@ FILES=					\
 	test-bpf.bin			\
 	test-get_cpuid.bin
 
+OUTPUT_FILES = $(addprefix $(OUTPUT),$(FILES))
+
 CC := $(CROSS_COMPILE)gcc -MD
 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
 
-all: $(FILES)
+all: $(OUTPUT_FILES)
 
-__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
-  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
+__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
+  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
 
 ###############################
 
-test-all.bin:
+$(OUTPUT)test-all.bin:
 	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
 
-test-hello.bin:
+$(OUTPUT)test-hello.bin:
 	$(BUILD)
 
-test-pthread-attr-setaffinity-np.bin:
+$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
 	$(BUILD) -D_GNU_SOURCE -lpthread
 
-test-stackprotector-all.bin:
+$(OUTPUT)test-stackprotector-all.bin:
 	$(BUILD) -fstack-protector-all
 
-test-fortify-source.bin:
+$(OUTPUT)test-fortify-source.bin:
 	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
 
-test-bionic.bin:
+$(OUTPUT)test-bionic.bin:
 	$(BUILD)
 
-test-libelf.bin:
+$(OUTPUT)test-libelf.bin:
 	$(BUILD) -lelf
 
-test-glibc.bin:
+$(OUTPUT)test-glibc.bin:
 	$(BUILD)
 
 DWARFLIBS := -ldw
@@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
 endif
 
-test-dwarf.bin:
+$(OUTPUT)test-dwarf.bin:
 	$(BUILD) $(DWARFLIBS)
 
-test-libelf-mmap.bin:
+$(OUTPUT)test-libelf-mmap.bin:
 	$(BUILD) -lelf
 
-test-libelf-getphdrnum.bin:
+$(OUTPUT)test-libelf-getphdrnum.bin:
 	$(BUILD) -lelf
 
-test-libnuma.bin:
+$(OUTPUT)test-libnuma.bin:
 	$(BUILD) -lnuma
 
-test-numa_num_possible_cpus.bin:
+$(OUTPUT)test-numa_num_possible_cpus.bin:
 	$(BUILD) -lnuma
 
-test-libunwind.bin:
+$(OUTPUT)test-libunwind.bin:
 	$(BUILD) -lelf
 
-test-libunwind-debug-frame.bin:
+$(OUTPUT)test-libunwind-debug-frame.bin:
 	$(BUILD) -lelf
 
-test-libaudit.bin:
+$(OUTPUT)test-libaudit.bin:
 	$(BUILD) -laudit
 
-test-libslang.bin:
+$(OUTPUT)test-libslang.bin:
 	$(BUILD) -I/usr/include/slang -lslang
 
-test-gtk2.bin:
+$(OUTPUT)test-gtk2.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
-test-gtk2-infobar.bin:
+$(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
 grep-libs  = $(filter -l%,$(1))
@@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
 
-test-libperl.bin:
+$(OUTPUT)test-libperl.bin:
 	$(BUILD) $(FLAGS_PERL_EMBED)
 
-test-libpython.bin:
+$(OUTPUT)test-libpython.bin:
 	$(BUILD)
 
-test-libpython-version.bin:
+$(OUTPUT)test-libpython-version.bin:
 	$(BUILD)
 
-test-libbfd.bin:
+$(OUTPUT)test-libbfd.bin:
 	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
 
-test-liberty.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
+$(OUTPUT)test-liberty.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
 
-test-liberty-z.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
+$(OUTPUT)test-liberty-z.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
 
-test-cplus-demangle.bin:
+$(OUTPUT)test-cplus-demangle.bin:
 	$(BUILD) -liberty
 
-test-backtrace.bin:
+$(OUTPUT)test-backtrace.bin:
 	$(BUILD)
 
-test-timerfd.bin:
+$(OUTPUT)test-timerfd.bin:
 	$(BUILD)
 
-test-libdw-dwarf-unwind.bin:
+$(OUTPUT)test-libdw-dwarf-unwind.bin:
 	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
 
-test-libbabeltrace.bin:
+$(OUTPUT)test-libbabeltrace.bin:
 	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
 
-test-sync-compare-and-swap.bin:
+$(OUTPUT)test-sync-compare-and-swap.bin:
 	$(BUILD)
 
-test-compile-32.bin:
-	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-32.bin:
+	$(CC) -m32 -o $@ test-compile.c
 
-test-compile-x32.bin:
-	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-x32.bin:
+	$(CC) -mx32 -o $@ test-compile.c
 
-test-zlib.bin:
+$(OUTPUT)test-zlib.bin:
 	$(BUILD) -lz
 
-test-lzma.bin:
+$(OUTPUT)test-lzma.bin:
 	$(BUILD) -llzma
 
-test-get_cpuid.bin:
+$(OUTPUT)test-get_cpuid.bin:
 	$(BUILD)
 
-test-bpf.bin:
+$(OUTPUT)test-bpf.bin:
 	$(BUILD)
 
--include *.d
+-include $(OUTPUT)*.d
 
 ###############################
 
 clean:
-	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
+	rm -f $(OUTPUT_FILES) $(OUTPUT)*.d $(OUTPUT_FILES:.bin=.make.output)
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291031 — Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-14 11:10 +0100
SubjectRe: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFyeT-4Fp-17@gated-at.bofh.it>
In reply to#1290829
On Sun, Dec 13, 2015 at 10:18:02PM -0600, Josh Poimboeuf wrote:
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
>  tools/build/Makefile.feature |  2 +-
>  tools/build/feature/Makefile | 95 ++++++++++++++++++++++----------------------
>  2 files changed, 49 insertions(+), 48 deletions(-)
> 
> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> index b8c31ec..6c0519d 100644
> --- a/tools/build/Makefile.feature
> +++ b/tools/build/Makefile.feature
> @@ -7,7 +7,7 @@ endif
>  
>  feature_check = $(eval $(feature_check_code))
>  define feature_check_code
> -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
>  endef
>  
>  feature_set = $(eval $(feature_set_code))
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index cea04ce9..8fec49d 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -1,4 +1,3 @@
> -
>  FILES=					\
>  	test-all.bin			\
>  	test-backtrace.bin		\
> @@ -38,38 +37,40 @@ FILES=					\
>  	test-bpf.bin			\
>  	test-get_cpuid.bin
>  
> +OUTPUT_FILES = $(addprefix $(OUTPUT),$(FILES))

seems there's no need to introduce new variable, you could use FILES:

FILES := $(addprefix $(OUTPUT),$(FILES))

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291212 — Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 15:10 +0100
SubjectRe: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFBZ8-7d6-27@gated-at.bofh.it>
In reply to#1291031
On Mon, Dec 14, 2015 at 11:08:51AM +0100, Jiri Olsa wrote:
> On Sun, Dec 13, 2015 at 10:18:02PM -0600, Josh Poimboeuf wrote:
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > ---
> >  tools/build/Makefile.feature |  2 +-
> >  tools/build/feature/Makefile | 95 ++++++++++++++++++++++----------------------
> >  2 files changed, 49 insertions(+), 48 deletions(-)
> > 
> > diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> > index b8c31ec..6c0519d 100644
> > --- a/tools/build/Makefile.feature
> > +++ b/tools/build/Makefile.feature
> > @@ -7,7 +7,7 @@ endif
> >  
> >  feature_check = $(eval $(feature_check_code))
> >  define feature_check_code
> > -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> > +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> >  endef
> >  
> >  feature_set = $(eval $(feature_set_code))
> > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> > index cea04ce9..8fec49d 100644
> > --- a/tools/build/feature/Makefile
> > +++ b/tools/build/feature/Makefile
> > @@ -1,4 +1,3 @@
> > -
> >  FILES=					\
> >  	test-all.bin			\
> >  	test-backtrace.bin		\
> > @@ -38,38 +37,40 @@ FILES=					\
> >  	test-bpf.bin			\
> >  	test-get_cpuid.bin
> >  
> > +OUTPUT_FILES = $(addprefix $(OUTPUT),$(FILES))
> 
> seems there's no need to introduce new variable, you could use FILES:
> 
> FILES := $(addprefix $(OUTPUT),$(FILES))

Sure, will do that.

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291226 — [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 15:30 +0100
Subject[PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFCit-7lj-5@gated-at.bofh.it>
In reply to#1291212
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/build/Makefile.feature |  2 +-
 tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
 2 files changed, 48 insertions(+), 47 deletions(-)

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index b8c31ec..6c0519d 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -7,7 +7,7 @@ endif
 
 feature_check = $(eval $(feature_check_code))
 define feature_check_code
-  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
+  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
 endef
 
 feature_set = $(eval $(feature_set_code))
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index cea04ce9..bf8f035 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -1,4 +1,3 @@
-
 FILES=					\
 	test-all.bin			\
 	test-backtrace.bin		\
@@ -38,38 +37,40 @@ FILES=					\
 	test-bpf.bin			\
 	test-get_cpuid.bin
 
+FILES := $(addprefix $(OUTPUT),$(FILES))
+
 CC := $(CROSS_COMPILE)gcc -MD
 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
 
 all: $(FILES)
 
-__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
-  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
+__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
+  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
 
 ###############################
 
-test-all.bin:
+$(OUTPUT)test-all.bin:
 	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
 
-test-hello.bin:
+$(OUTPUT)test-hello.bin:
 	$(BUILD)
 
-test-pthread-attr-setaffinity-np.bin:
+$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
 	$(BUILD) -D_GNU_SOURCE -lpthread
 
-test-stackprotector-all.bin:
+$(OUTPUT)test-stackprotector-all.bin:
 	$(BUILD) -fstack-protector-all
 
-test-fortify-source.bin:
+$(OUTPUT)test-fortify-source.bin:
 	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
 
-test-bionic.bin:
+$(OUTPUT)test-bionic.bin:
 	$(BUILD)
 
-test-libelf.bin:
+$(OUTPUT)test-libelf.bin:
 	$(BUILD) -lelf
 
-test-glibc.bin:
+$(OUTPUT)test-glibc.bin:
 	$(BUILD)
 
 DWARFLIBS := -ldw
@@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
 endif
 
-test-dwarf.bin:
+$(OUTPUT)test-dwarf.bin:
 	$(BUILD) $(DWARFLIBS)
 
-test-libelf-mmap.bin:
+$(OUTPUT)test-libelf-mmap.bin:
 	$(BUILD) -lelf
 
-test-libelf-getphdrnum.bin:
+$(OUTPUT)test-libelf-getphdrnum.bin:
 	$(BUILD) -lelf
 
-test-libnuma.bin:
+$(OUTPUT)test-libnuma.bin:
 	$(BUILD) -lnuma
 
-test-numa_num_possible_cpus.bin:
+$(OUTPUT)test-numa_num_possible_cpus.bin:
 	$(BUILD) -lnuma
 
-test-libunwind.bin:
+$(OUTPUT)test-libunwind.bin:
 	$(BUILD) -lelf
 
-test-libunwind-debug-frame.bin:
+$(OUTPUT)test-libunwind-debug-frame.bin:
 	$(BUILD) -lelf
 
-test-libaudit.bin:
+$(OUTPUT)test-libaudit.bin:
 	$(BUILD) -laudit
 
-test-libslang.bin:
+$(OUTPUT)test-libslang.bin:
 	$(BUILD) -I/usr/include/slang -lslang
 
-test-gtk2.bin:
+$(OUTPUT)test-gtk2.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
-test-gtk2-infobar.bin:
+$(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
 grep-libs  = $(filter -l%,$(1))
@@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
 
-test-libperl.bin:
+$(OUTPUT)test-libperl.bin:
 	$(BUILD) $(FLAGS_PERL_EMBED)
 
-test-libpython.bin:
+$(OUTPUT)test-libpython.bin:
 	$(BUILD)
 
-test-libpython-version.bin:
+$(OUTPUT)test-libpython-version.bin:
 	$(BUILD)
 
-test-libbfd.bin:
+$(OUTPUT)test-libbfd.bin:
 	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
 
-test-liberty.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
+$(OUTPUT)test-liberty.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
 
-test-liberty-z.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
+$(OUTPUT)test-liberty-z.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
 
-test-cplus-demangle.bin:
+$(OUTPUT)test-cplus-demangle.bin:
 	$(BUILD) -liberty
 
-test-backtrace.bin:
+$(OUTPUT)test-backtrace.bin:
 	$(BUILD)
 
-test-timerfd.bin:
+$(OUTPUT)test-timerfd.bin:
 	$(BUILD)
 
-test-libdw-dwarf-unwind.bin:
+$(OUTPUT)test-libdw-dwarf-unwind.bin:
 	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
 
-test-libbabeltrace.bin:
+$(OUTPUT)test-libbabeltrace.bin:
 	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
 
-test-sync-compare-and-swap.bin:
+$(OUTPUT)test-sync-compare-and-swap.bin:
 	$(BUILD)
 
-test-compile-32.bin:
-	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-32.bin:
+	$(CC) -m32 -o $@ test-compile.c
 
-test-compile-x32.bin:
-	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-x32.bin:
+	$(CC) -mx32 -o $@ test-compile.c
 
-test-zlib.bin:
+$(OUTPUT)test-zlib.bin:
 	$(BUILD) -lz
 
-test-lzma.bin:
+$(OUTPUT)test-lzma.bin:
 	$(BUILD) -llzma
 
-test-get_cpuid.bin:
+$(OUTPUT)test-get_cpuid.bin:
 	$(BUILD)
 
-test-bpf.bin:
+$(OUTPUT)test-bpf.bin:
 	$(BUILD)
 
--include *.d
+-include $(OUTPUT)*.d
 
 ###############################
 
 clean:
-	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
+	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291260 — Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-14 16:20 +0100
SubjectRe: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFD4S-7Rv-15@gated-at.bofh.it>
In reply to#1291226
Em Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf escreveu:
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
>  tools/build/Makefile.feature |  2 +-
>  tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
>  2 files changed, 48 insertions(+), 47 deletions(-)

Jiri, Ok now?

- Arnaldo
 
> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> index b8c31ec..6c0519d 100644
> --- a/tools/build/Makefile.feature
> +++ b/tools/build/Makefile.feature
> @@ -7,7 +7,7 @@ endif
>  
>  feature_check = $(eval $(feature_check_code))
>  define feature_check_code
> -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
>  endef
>  
>  feature_set = $(eval $(feature_set_code))
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index cea04ce9..bf8f035 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -1,4 +1,3 @@
> -
>  FILES=					\
>  	test-all.bin			\
>  	test-backtrace.bin		\
> @@ -38,38 +37,40 @@ FILES=					\
>  	test-bpf.bin			\
>  	test-get_cpuid.bin
>  
> +FILES := $(addprefix $(OUTPUT),$(FILES))
> +
>  CC := $(CROSS_COMPILE)gcc -MD
>  PKG_CONFIG := $(CROSS_COMPILE)pkg-config
>  
>  all: $(FILES)
>  
> -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
> -  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
> +__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> +  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
>  
>  ###############################
>  
> -test-all.bin:
> +$(OUTPUT)test-all.bin:
>  	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
>  
> -test-hello.bin:
> +$(OUTPUT)test-hello.bin:
>  	$(BUILD)
>  
> -test-pthread-attr-setaffinity-np.bin:
> +$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
>  	$(BUILD) -D_GNU_SOURCE -lpthread
>  
> -test-stackprotector-all.bin:
> +$(OUTPUT)test-stackprotector-all.bin:
>  	$(BUILD) -fstack-protector-all
>  
> -test-fortify-source.bin:
> +$(OUTPUT)test-fortify-source.bin:
>  	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
>  
> -test-bionic.bin:
> +$(OUTPUT)test-bionic.bin:
>  	$(BUILD)
>  
> -test-libelf.bin:
> +$(OUTPUT)test-libelf.bin:
>  	$(BUILD) -lelf
>  
> -test-glibc.bin:
> +$(OUTPUT)test-glibc.bin:
>  	$(BUILD)
>  
>  DWARFLIBS := -ldw
> @@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
>  DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
>  endif
>  
> -test-dwarf.bin:
> +$(OUTPUT)test-dwarf.bin:
>  	$(BUILD) $(DWARFLIBS)
>  
> -test-libelf-mmap.bin:
> +$(OUTPUT)test-libelf-mmap.bin:
>  	$(BUILD) -lelf
>  
> -test-libelf-getphdrnum.bin:
> +$(OUTPUT)test-libelf-getphdrnum.bin:
>  	$(BUILD) -lelf
>  
> -test-libnuma.bin:
> +$(OUTPUT)test-libnuma.bin:
>  	$(BUILD) -lnuma
>  
> -test-numa_num_possible_cpus.bin:
> +$(OUTPUT)test-numa_num_possible_cpus.bin:
>  	$(BUILD) -lnuma
>  
> -test-libunwind.bin:
> +$(OUTPUT)test-libunwind.bin:
>  	$(BUILD) -lelf
>  
> -test-libunwind-debug-frame.bin:
> +$(OUTPUT)test-libunwind-debug-frame.bin:
>  	$(BUILD) -lelf
>  
> -test-libaudit.bin:
> +$(OUTPUT)test-libaudit.bin:
>  	$(BUILD) -laudit
>  
> -test-libslang.bin:
> +$(OUTPUT)test-libslang.bin:
>  	$(BUILD) -I/usr/include/slang -lslang
>  
> -test-gtk2.bin:
> +$(OUTPUT)test-gtk2.bin:
>  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
>  
> -test-gtk2-infobar.bin:
> +$(OUTPUT)test-gtk2-infobar.bin:
>  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
>  
>  grep-libs  = $(filter -l%,$(1))
> @@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
>  PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
>  FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
>  
> -test-libperl.bin:
> +$(OUTPUT)test-libperl.bin:
>  	$(BUILD) $(FLAGS_PERL_EMBED)
>  
> -test-libpython.bin:
> +$(OUTPUT)test-libpython.bin:
>  	$(BUILD)
>  
> -test-libpython-version.bin:
> +$(OUTPUT)test-libpython-version.bin:
>  	$(BUILD)
>  
> -test-libbfd.bin:
> +$(OUTPUT)test-libbfd.bin:
>  	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
>  
> -test-liberty.bin:
> -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> +$(OUTPUT)test-liberty.bin:
> +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
>  
> -test-liberty-z.bin:
> -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> +$(OUTPUT)test-liberty-z.bin:
> +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
>  
> -test-cplus-demangle.bin:
> +$(OUTPUT)test-cplus-demangle.bin:
>  	$(BUILD) -liberty
>  
> -test-backtrace.bin:
> +$(OUTPUT)test-backtrace.bin:
>  	$(BUILD)
>  
> -test-timerfd.bin:
> +$(OUTPUT)test-timerfd.bin:
>  	$(BUILD)
>  
> -test-libdw-dwarf-unwind.bin:
> +$(OUTPUT)test-libdw-dwarf-unwind.bin:
>  	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
>  
> -test-libbabeltrace.bin:
> +$(OUTPUT)test-libbabeltrace.bin:
>  	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
>  
> -test-sync-compare-and-swap.bin:
> +$(OUTPUT)test-sync-compare-and-swap.bin:
>  	$(BUILD)
>  
> -test-compile-32.bin:
> -	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
> +$(OUTPUT)test-compile-32.bin:
> +	$(CC) -m32 -o $@ test-compile.c
>  
> -test-compile-x32.bin:
> -	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
> +$(OUTPUT)test-compile-x32.bin:
> +	$(CC) -mx32 -o $@ test-compile.c
>  
> -test-zlib.bin:
> +$(OUTPUT)test-zlib.bin:
>  	$(BUILD) -lz
>  
> -test-lzma.bin:
> +$(OUTPUT)test-lzma.bin:
>  	$(BUILD) -llzma
>  
> -test-get_cpuid.bin:
> +$(OUTPUT)test-get_cpuid.bin:
>  	$(BUILD)
>  
> -test-bpf.bin:
> +$(OUTPUT)test-bpf.bin:
>  	$(BUILD)
>  
> --include *.d
> +-include $(OUTPUT)*.d
>  
>  ###############################
>  
>  clean:
> -	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
> +	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
> -- 
> 2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291277 — Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-14 16:30 +0100
SubjectRe: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFDey-7Vd-25@gated-at.bofh.it>
In reply to#1291226
On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote:
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>

you might want to work on your changelogs
a little..  aaand actually include some ;-)

did you update your branch with this change?

jirka

> ---
>  tools/build/Makefile.feature |  2 +-
>  tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
>  2 files changed, 48 insertions(+), 47 deletions(-)
> 
> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> index b8c31ec..6c0519d 100644
> --- a/tools/build/Makefile.feature
> +++ b/tools/build/Makefile.feature
> @@ -7,7 +7,7 @@ endif
>  
>  feature_check = $(eval $(feature_check_code))
>  define feature_check_code
> -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
>  endef
>  
>  feature_set = $(eval $(feature_set_code))
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index cea04ce9..bf8f035 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -1,4 +1,3 @@
> -
>  FILES=					\
>  	test-all.bin			\
>  	test-backtrace.bin		\
> @@ -38,38 +37,40 @@ FILES=					\
>  	test-bpf.bin			\
>  	test-get_cpuid.bin
>  
> +FILES := $(addprefix $(OUTPUT),$(FILES))
> +
>  CC := $(CROSS_COMPILE)gcc -MD
>  PKG_CONFIG := $(CROSS_COMPILE)pkg-config
>  
>  all: $(FILES)
>  
> -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
> -  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
> +__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> +  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
>  
>  ###############################
>  
> -test-all.bin:
> +$(OUTPUT)test-all.bin:
>  	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
>  
> -test-hello.bin:
> +$(OUTPUT)test-hello.bin:
>  	$(BUILD)
>  
> -test-pthread-attr-setaffinity-np.bin:
> +$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
>  	$(BUILD) -D_GNU_SOURCE -lpthread
>  
> -test-stackprotector-all.bin:
> +$(OUTPUT)test-stackprotector-all.bin:
>  	$(BUILD) -fstack-protector-all
>  
> -test-fortify-source.bin:
> +$(OUTPUT)test-fortify-source.bin:
>  	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
>  
> -test-bionic.bin:
> +$(OUTPUT)test-bionic.bin:
>  	$(BUILD)
>  
> -test-libelf.bin:
> +$(OUTPUT)test-libelf.bin:
>  	$(BUILD) -lelf
>  
> -test-glibc.bin:
> +$(OUTPUT)test-glibc.bin:
>  	$(BUILD)
>  
>  DWARFLIBS := -ldw
> @@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
>  DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
>  endif
>  
> -test-dwarf.bin:
> +$(OUTPUT)test-dwarf.bin:
>  	$(BUILD) $(DWARFLIBS)
>  
> -test-libelf-mmap.bin:
> +$(OUTPUT)test-libelf-mmap.bin:
>  	$(BUILD) -lelf
>  
> -test-libelf-getphdrnum.bin:
> +$(OUTPUT)test-libelf-getphdrnum.bin:
>  	$(BUILD) -lelf
>  
> -test-libnuma.bin:
> +$(OUTPUT)test-libnuma.bin:
>  	$(BUILD) -lnuma
>  
> -test-numa_num_possible_cpus.bin:
> +$(OUTPUT)test-numa_num_possible_cpus.bin:
>  	$(BUILD) -lnuma
>  
> -test-libunwind.bin:
> +$(OUTPUT)test-libunwind.bin:
>  	$(BUILD) -lelf
>  
> -test-libunwind-debug-frame.bin:
> +$(OUTPUT)test-libunwind-debug-frame.bin:
>  	$(BUILD) -lelf
>  
> -test-libaudit.bin:
> +$(OUTPUT)test-libaudit.bin:
>  	$(BUILD) -laudit
>  
> -test-libslang.bin:
> +$(OUTPUT)test-libslang.bin:
>  	$(BUILD) -I/usr/include/slang -lslang
>  
> -test-gtk2.bin:
> +$(OUTPUT)test-gtk2.bin:
>  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
>  
> -test-gtk2-infobar.bin:
> +$(OUTPUT)test-gtk2-infobar.bin:
>  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
>  
>  grep-libs  = $(filter -l%,$(1))
> @@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
>  PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
>  FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
>  
> -test-libperl.bin:
> +$(OUTPUT)test-libperl.bin:
>  	$(BUILD) $(FLAGS_PERL_EMBED)
>  
> -test-libpython.bin:
> +$(OUTPUT)test-libpython.bin:
>  	$(BUILD)
>  
> -test-libpython-version.bin:
> +$(OUTPUT)test-libpython-version.bin:
>  	$(BUILD)
>  
> -test-libbfd.bin:
> +$(OUTPUT)test-libbfd.bin:
>  	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
>  
> -test-liberty.bin:
> -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> +$(OUTPUT)test-liberty.bin:
> +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
>  
> -test-liberty-z.bin:
> -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> +$(OUTPUT)test-liberty-z.bin:
> +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
>  
> -test-cplus-demangle.bin:
> +$(OUTPUT)test-cplus-demangle.bin:
>  	$(BUILD) -liberty
>  
> -test-backtrace.bin:
> +$(OUTPUT)test-backtrace.bin:
>  	$(BUILD)
>  
> -test-timerfd.bin:
> +$(OUTPUT)test-timerfd.bin:
>  	$(BUILD)
>  
> -test-libdw-dwarf-unwind.bin:
> +$(OUTPUT)test-libdw-dwarf-unwind.bin:
>  	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
>  
> -test-libbabeltrace.bin:
> +$(OUTPUT)test-libbabeltrace.bin:
>  	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
>  
> -test-sync-compare-and-swap.bin:
> +$(OUTPUT)test-sync-compare-and-swap.bin:
>  	$(BUILD)
>  
> -test-compile-32.bin:
> -	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
> +$(OUTPUT)test-compile-32.bin:
> +	$(CC) -m32 -o $@ test-compile.c
>  
> -test-compile-x32.bin:
> -	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
> +$(OUTPUT)test-compile-x32.bin:
> +	$(CC) -mx32 -o $@ test-compile.c
>  
> -test-zlib.bin:
> +$(OUTPUT)test-zlib.bin:
>  	$(BUILD) -lz
>  
> -test-lzma.bin:
> +$(OUTPUT)test-lzma.bin:
>  	$(BUILD) -llzma
>  
> -test-get_cpuid.bin:
> +$(OUTPUT)test-get_cpuid.bin:
>  	$(BUILD)
>  
> -test-bpf.bin:
> +$(OUTPUT)test-bpf.bin:
>  	$(BUILD)
>  
> --include *.d
> +-include $(OUTPUT)*.d
>  
>  ###############################
>  
>  clean:
> -	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
> +	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
> -- 
> 2.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291288 — Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 16:40 +0100
SubjectRe: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFDoe-7ZC-29@gated-at.bofh.it>
In reply to#1291277
On Mon, Dec 14, 2015 at 04:29:39PM +0100, Jiri Olsa wrote:
> On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote:
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> 
> you might want to work on your changelogs
> a little..  aaand actually include some ;-)

Well, I thought the subject said it all :-)

> did you update your branch with this change?

Sure, see branch 'perf-subcmd-v3.1':

  https://github.com/jpoimboe/linux

> 
> jirka
> 
> > ---
> >  tools/build/Makefile.feature |  2 +-
> >  tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
> >  2 files changed, 48 insertions(+), 47 deletions(-)
> > 
> > diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> > index b8c31ec..6c0519d 100644
> > --- a/tools/build/Makefile.feature
> > +++ b/tools/build/Makefile.feature
> > @@ -7,7 +7,7 @@ endif
> >  
> >  feature_check = $(eval $(feature_check_code))
> >  define feature_check_code
> > -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> > +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> >  endef
> >  
> >  feature_set = $(eval $(feature_set_code))
> > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> > index cea04ce9..bf8f035 100644
> > --- a/tools/build/feature/Makefile
> > +++ b/tools/build/feature/Makefile
> > @@ -1,4 +1,3 @@
> > -
> >  FILES=					\
> >  	test-all.bin			\
> >  	test-backtrace.bin		\
> > @@ -38,38 +37,40 @@ FILES=					\
> >  	test-bpf.bin			\
> >  	test-get_cpuid.bin
> >  
> > +FILES := $(addprefix $(OUTPUT),$(FILES))
> > +
> >  CC := $(CROSS_COMPILE)gcc -MD
> >  PKG_CONFIG := $(CROSS_COMPILE)pkg-config
> >  
> >  all: $(FILES)
> >  
> > -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
> > -  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
> > +__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> > +  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
> >  
> >  ###############################
> >  
> > -test-all.bin:
> > +$(OUTPUT)test-all.bin:
> >  	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
> >  
> > -test-hello.bin:
> > +$(OUTPUT)test-hello.bin:
> >  	$(BUILD)
> >  
> > -test-pthread-attr-setaffinity-np.bin:
> > +$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
> >  	$(BUILD) -D_GNU_SOURCE -lpthread
> >  
> > -test-stackprotector-all.bin:
> > +$(OUTPUT)test-stackprotector-all.bin:
> >  	$(BUILD) -fstack-protector-all
> >  
> > -test-fortify-source.bin:
> > +$(OUTPUT)test-fortify-source.bin:
> >  	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
> >  
> > -test-bionic.bin:
> > +$(OUTPUT)test-bionic.bin:
> >  	$(BUILD)
> >  
> > -test-libelf.bin:
> > +$(OUTPUT)test-libelf.bin:
> >  	$(BUILD) -lelf
> >  
> > -test-glibc.bin:
> > +$(OUTPUT)test-glibc.bin:
> >  	$(BUILD)
> >  
> >  DWARFLIBS := -ldw
> > @@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
> >  DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
> >  endif
> >  
> > -test-dwarf.bin:
> > +$(OUTPUT)test-dwarf.bin:
> >  	$(BUILD) $(DWARFLIBS)
> >  
> > -test-libelf-mmap.bin:
> > +$(OUTPUT)test-libelf-mmap.bin:
> >  	$(BUILD) -lelf
> >  
> > -test-libelf-getphdrnum.bin:
> > +$(OUTPUT)test-libelf-getphdrnum.bin:
> >  	$(BUILD) -lelf
> >  
> > -test-libnuma.bin:
> > +$(OUTPUT)test-libnuma.bin:
> >  	$(BUILD) -lnuma
> >  
> > -test-numa_num_possible_cpus.bin:
> > +$(OUTPUT)test-numa_num_possible_cpus.bin:
> >  	$(BUILD) -lnuma
> >  
> > -test-libunwind.bin:
> > +$(OUTPUT)test-libunwind.bin:
> >  	$(BUILD) -lelf
> >  
> > -test-libunwind-debug-frame.bin:
> > +$(OUTPUT)test-libunwind-debug-frame.bin:
> >  	$(BUILD) -lelf
> >  
> > -test-libaudit.bin:
> > +$(OUTPUT)test-libaudit.bin:
> >  	$(BUILD) -laudit
> >  
> > -test-libslang.bin:
> > +$(OUTPUT)test-libslang.bin:
> >  	$(BUILD) -I/usr/include/slang -lslang
> >  
> > -test-gtk2.bin:
> > +$(OUTPUT)test-gtk2.bin:
> >  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
> >  
> > -test-gtk2-infobar.bin:
> > +$(OUTPUT)test-gtk2-infobar.bin:
> >  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
> >  
> >  grep-libs  = $(filter -l%,$(1))
> > @@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
> >  PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
> >  FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
> >  
> > -test-libperl.bin:
> > +$(OUTPUT)test-libperl.bin:
> >  	$(BUILD) $(FLAGS_PERL_EMBED)
> >  
> > -test-libpython.bin:
> > +$(OUTPUT)test-libpython.bin:
> >  	$(BUILD)
> >  
> > -test-libpython-version.bin:
> > +$(OUTPUT)test-libpython-version.bin:
> >  	$(BUILD)
> >  
> > -test-libbfd.bin:
> > +$(OUTPUT)test-libbfd.bin:
> >  	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
> >  
> > -test-liberty.bin:
> > -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> > +$(OUTPUT)test-liberty.bin:
> > +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> >  
> > -test-liberty-z.bin:
> > -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> > +$(OUTPUT)test-liberty-z.bin:
> > +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> >  
> > -test-cplus-demangle.bin:
> > +$(OUTPUT)test-cplus-demangle.bin:
> >  	$(BUILD) -liberty
> >  
> > -test-backtrace.bin:
> > +$(OUTPUT)test-backtrace.bin:
> >  	$(BUILD)
> >  
> > -test-timerfd.bin:
> > +$(OUTPUT)test-timerfd.bin:
> >  	$(BUILD)
> >  
> > -test-libdw-dwarf-unwind.bin:
> > +$(OUTPUT)test-libdw-dwarf-unwind.bin:
> >  	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
> >  
> > -test-libbabeltrace.bin:
> > +$(OUTPUT)test-libbabeltrace.bin:
> >  	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
> >  
> > -test-sync-compare-and-swap.bin:
> > +$(OUTPUT)test-sync-compare-and-swap.bin:
> >  	$(BUILD)
> >  
> > -test-compile-32.bin:
> > -	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
> > +$(OUTPUT)test-compile-32.bin:
> > +	$(CC) -m32 -o $@ test-compile.c
> >  
> > -test-compile-x32.bin:
> > -	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
> > +$(OUTPUT)test-compile-x32.bin:
> > +	$(CC) -mx32 -o $@ test-compile.c
> >  
> > -test-zlib.bin:
> > +$(OUTPUT)test-zlib.bin:
> >  	$(BUILD) -lz
> >  
> > -test-lzma.bin:
> > +$(OUTPUT)test-lzma.bin:
> >  	$(BUILD) -llzma
> >  
> > -test-get_cpuid.bin:
> > +$(OUTPUT)test-get_cpuid.bin:
> >  	$(BUILD)
> >  
> > -test-bpf.bin:
> > +$(OUTPUT)test-bpf.bin:
> >  	$(BUILD)
> >  
> > --include *.d
> > +-include $(OUTPUT)*.d
> >  
> >  ###############################
> >  
> >  clean:
> > -	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
> > +	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
> > -- 
> > 2.4.3
> > 

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291310 — Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-14 17:00 +0100
SubjectRe: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFDHA-86S-19@gated-at.bofh.it>
In reply to#1291288
On Mon, Dec 14, 2015 at 09:38:15AM -0600, Josh Poimboeuf wrote:
> On Mon, Dec 14, 2015 at 04:29:39PM +0100, Jiri Olsa wrote:
> > On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote:
> > > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > 
> > you might want to work on your changelogs
> > a little..  aaand actually include some ;-)
> 
> Well, I thought the subject said it all :-)

well, you could be more specific, like:
- how was it broken before
- what did you do to fix it
- how you added a test case to ensure this will never happen again ;-)

it makes the life of reviewer a bit easier, anyway:

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> 
> > did you update your branch with this change?
> 
> Sure, see branch 'perf-subcmd-v3.1':
> 
>   https://github.com/jpoimboe/linux
> 
> > 
> > jirka
> > 
> > > ---
> > >  tools/build/Makefile.feature |  2 +-
> > >  tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
> > >  2 files changed, 48 insertions(+), 47 deletions(-)


> > > 
> > > diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
> > > index b8c31ec..6c0519d 100644
> > > --- a/tools/build/Makefile.feature
> > > +++ b/tools/build/Makefile.feature
> > > @@ -7,7 +7,7 @@ endif
> > >  
> > >  feature_check = $(eval $(feature_check_code))
> > >  define feature_check_code
> > > -  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> > > +  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
> > >  endef
> > >  
> > >  feature_set = $(eval $(feature_set_code))
> > > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> > > index cea04ce9..bf8f035 100644
> > > --- a/tools/build/feature/Makefile
> > > +++ b/tools/build/feature/Makefile
> > > @@ -1,4 +1,3 @@
> > > -
> > >  FILES=					\
> > >  	test-all.bin			\
> > >  	test-backtrace.bin		\
> > > @@ -38,38 +37,40 @@ FILES=					\
> > >  	test-bpf.bin			\
> > >  	test-get_cpuid.bin
> > >  
> > > +FILES := $(addprefix $(OUTPUT),$(FILES))
> > > +
> > >  CC := $(CROSS_COMPILE)gcc -MD
> > >  PKG_CONFIG := $(CROSS_COMPILE)pkg-config
> > >  
> > >  all: $(FILES)
> > >  
> > > -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
> > > -  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
> > > +__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> > > +  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
> > >  
> > >  ###############################
> > >  
> > > -test-all.bin:
> > > +$(OUTPUT)test-all.bin:
> > >  	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
> > >  
> > > -test-hello.bin:
> > > +$(OUTPUT)test-hello.bin:
> > >  	$(BUILD)
> > >  
> > > -test-pthread-attr-setaffinity-np.bin:
> > > +$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
> > >  	$(BUILD) -D_GNU_SOURCE -lpthread
> > >  
> > > -test-stackprotector-all.bin:
> > > +$(OUTPUT)test-stackprotector-all.bin:
> > >  	$(BUILD) -fstack-protector-all
> > >  
> > > -test-fortify-source.bin:
> > > +$(OUTPUT)test-fortify-source.bin:
> > >  	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
> > >  
> > > -test-bionic.bin:
> > > +$(OUTPUT)test-bionic.bin:
> > >  	$(BUILD)
> > >  
> > > -test-libelf.bin:
> > > +$(OUTPUT)test-libelf.bin:
> > >  	$(BUILD) -lelf
> > >  
> > > -test-glibc.bin:
> > > +$(OUTPUT)test-glibc.bin:
> > >  	$(BUILD)
> > >  
> > >  DWARFLIBS := -ldw
> > > @@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
> > >  DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
> > >  endif
> > >  
> > > -test-dwarf.bin:
> > > +$(OUTPUT)test-dwarf.bin:
> > >  	$(BUILD) $(DWARFLIBS)
> > >  
> > > -test-libelf-mmap.bin:
> > > +$(OUTPUT)test-libelf-mmap.bin:
> > >  	$(BUILD) -lelf
> > >  
> > > -test-libelf-getphdrnum.bin:
> > > +$(OUTPUT)test-libelf-getphdrnum.bin:
> > >  	$(BUILD) -lelf
> > >  
> > > -test-libnuma.bin:
> > > +$(OUTPUT)test-libnuma.bin:
> > >  	$(BUILD) -lnuma
> > >  
> > > -test-numa_num_possible_cpus.bin:
> > > +$(OUTPUT)test-numa_num_possible_cpus.bin:
> > >  	$(BUILD) -lnuma
> > >  
> > > -test-libunwind.bin:
> > > +$(OUTPUT)test-libunwind.bin:
> > >  	$(BUILD) -lelf
> > >  
> > > -test-libunwind-debug-frame.bin:
> > > +$(OUTPUT)test-libunwind-debug-frame.bin:
> > >  	$(BUILD) -lelf
> > >  
> > > -test-libaudit.bin:
> > > +$(OUTPUT)test-libaudit.bin:
> > >  	$(BUILD) -laudit
> > >  
> > > -test-libslang.bin:
> > > +$(OUTPUT)test-libslang.bin:
> > >  	$(BUILD) -I/usr/include/slang -lslang
> > >  
> > > -test-gtk2.bin:
> > > +$(OUTPUT)test-gtk2.bin:
> > >  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
> > >  
> > > -test-gtk2-infobar.bin:
> > > +$(OUTPUT)test-gtk2-infobar.bin:
> > >  	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
> > >  
> > >  grep-libs  = $(filter -l%,$(1))
> > > @@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
> > >  PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
> > >  FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
> > >  
> > > -test-libperl.bin:
> > > +$(OUTPUT)test-libperl.bin:
> > >  	$(BUILD) $(FLAGS_PERL_EMBED)
> > >  
> > > -test-libpython.bin:
> > > +$(OUTPUT)test-libpython.bin:
> > >  	$(BUILD)
> > >  
> > > -test-libpython-version.bin:
> > > +$(OUTPUT)test-libpython-version.bin:
> > >  	$(BUILD)
> > >  
> > > -test-libbfd.bin:
> > > +$(OUTPUT)test-libbfd.bin:
> > >  	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
> > >  
> > > -test-liberty.bin:
> > > -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> > > +$(OUTPUT)test-liberty.bin:
> > > +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
> > >  
> > > -test-liberty-z.bin:
> > > -	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> > > +$(OUTPUT)test-liberty-z.bin:
> > > +	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
> > >  
> > > -test-cplus-demangle.bin:
> > > +$(OUTPUT)test-cplus-demangle.bin:
> > >  	$(BUILD) -liberty
> > >  
> > > -test-backtrace.bin:
> > > +$(OUTPUT)test-backtrace.bin:
> > >  	$(BUILD)
> > >  
> > > -test-timerfd.bin:
> > > +$(OUTPUT)test-timerfd.bin:
> > >  	$(BUILD)
> > >  
> > > -test-libdw-dwarf-unwind.bin:
> > > +$(OUTPUT)test-libdw-dwarf-unwind.bin:
> > >  	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
> > >  
> > > -test-libbabeltrace.bin:
> > > +$(OUTPUT)test-libbabeltrace.bin:
> > >  	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
> > >  
> > > -test-sync-compare-and-swap.bin:
> > > +$(OUTPUT)test-sync-compare-and-swap.bin:
> > >  	$(BUILD)
> > >  
> > > -test-compile-32.bin:
> > > -	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
> > > +$(OUTPUT)test-compile-32.bin:
> > > +	$(CC) -m32 -o $@ test-compile.c
> > >  
> > > -test-compile-x32.bin:
> > > -	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
> > > +$(OUTPUT)test-compile-x32.bin:
> > > +	$(CC) -mx32 -o $@ test-compile.c
> > >  
> > > -test-zlib.bin:
> > > +$(OUTPUT)test-zlib.bin:
> > >  	$(BUILD) -lz
> > >  
> > > -test-lzma.bin:
> > > +$(OUTPUT)test-lzma.bin:
> > >  	$(BUILD) -llzma
> > >  
> > > -test-get_cpuid.bin:
> > > +$(OUTPUT)test-get_cpuid.bin:
> > >  	$(BUILD)
> > >  
> > > -test-bpf.bin:
> > > +$(OUTPUT)test-bpf.bin:
> > >  	$(BUILD)
> > >  
> > > --include *.d
> > > +-include $(OUTPUT)*.d
> > >  
> > >  ###############################
> > >  
> > >  clean:
> > > -	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
> > > +	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
> > > -- 
> > > 2.4.3
> > > 
> 
> -- 
> Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291314 — Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 17:10 +0100
SubjectRe: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='
Message-ID<qFDRg-8pJ-7@gated-at.bofh.it>
In reply to#1291310
On Mon, Dec 14, 2015 at 04:55:28PM +0100, Jiri Olsa wrote:
> On Mon, Dec 14, 2015 at 09:38:15AM -0600, Josh Poimboeuf wrote:
> > On Mon, Dec 14, 2015 at 04:29:39PM +0100, Jiri Olsa wrote:
> > > On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote:
> > > > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > > 
> > > you might want to work on your changelogs
> > > a little..  aaand actually include some ;-)
> > 
> > Well, I thought the subject said it all :-)
> 
> well, you could be more specific, like:
> - how was it broken before
> - what did you do to fix it
> - how you added a test case to ensure this will never happen again ;-)
> 
> it makes the life of reviewer a bit easier, anyway:
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks.  I'll try to be more verbose in future changelogs.

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291430 — [PATCH v3.2] tools build: Fix feature Makefile issues with 'O='

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 19:40 +0100
Subject[PATCH v3.2] tools build: Fix feature Makefile issues with 'O='
Message-ID<qFGcq-1pc-17@gated-at.bofh.it>
In reply to#1291310
When building perf binaries outside the source tree with 'make O=<dir>',
the auto-detected features get re-tested for every build, which is
unnecessary and inconsistent with the behavior seen when building
directly in the source tree.

Another issue is that 'make O=<dir> clean' doesn't remove the feature
files from the object tree.

Fix these problems by looking for the binaries in the $(OUTPUT)
directory.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
---
v3.2: add changelog

 tools/build/Makefile.feature |  2 +-
 tools/build/feature/Makefile | 93 ++++++++++++++++++++++----------------------
 2 files changed, 48 insertions(+), 47 deletions(-)

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index b8c31ec..6c0519d 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -7,7 +7,7 @@ endif
 
 feature_check = $(eval $(feature_check_code))
 define feature_check_code
-  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
+  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0)
 endef
 
 feature_set = $(eval $(feature_set_code))
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index cea04ce9..bf8f035 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -1,4 +1,3 @@
-
 FILES=					\
 	test-all.bin			\
 	test-backtrace.bin		\
@@ -38,38 +37,40 @@ FILES=					\
 	test-bpf.bin			\
 	test-get_cpuid.bin
 
+FILES := $(addprefix $(OUTPUT),$(FILES))
+
 CC := $(CROSS_COMPILE)gcc -MD
 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
 
 all: $(FILES)
 
-__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
-  BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
+__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
+  BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
 
 ###############################
 
-test-all.bin:
+$(OUTPUT)test-all.bin:
 	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
 
-test-hello.bin:
+$(OUTPUT)test-hello.bin:
 	$(BUILD)
 
-test-pthread-attr-setaffinity-np.bin:
+$(OUTPUT)test-pthread-attr-setaffinity-np.bin:
 	$(BUILD) -D_GNU_SOURCE -lpthread
 
-test-stackprotector-all.bin:
+$(OUTPUT)test-stackprotector-all.bin:
 	$(BUILD) -fstack-protector-all
 
-test-fortify-source.bin:
+$(OUTPUT)test-fortify-source.bin:
 	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
 
-test-bionic.bin:
+$(OUTPUT)test-bionic.bin:
 	$(BUILD)
 
-test-libelf.bin:
+$(OUTPUT)test-libelf.bin:
 	$(BUILD) -lelf
 
-test-glibc.bin:
+$(OUTPUT)test-glibc.bin:
 	$(BUILD)
 
 DWARFLIBS := -ldw
@@ -77,37 +78,37 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
 endif
 
-test-dwarf.bin:
+$(OUTPUT)test-dwarf.bin:
 	$(BUILD) $(DWARFLIBS)
 
-test-libelf-mmap.bin:
+$(OUTPUT)test-libelf-mmap.bin:
 	$(BUILD) -lelf
 
-test-libelf-getphdrnum.bin:
+$(OUTPUT)test-libelf-getphdrnum.bin:
 	$(BUILD) -lelf
 
-test-libnuma.bin:
+$(OUTPUT)test-libnuma.bin:
 	$(BUILD) -lnuma
 
-test-numa_num_possible_cpus.bin:
+$(OUTPUT)test-numa_num_possible_cpus.bin:
 	$(BUILD) -lnuma
 
-test-libunwind.bin:
+$(OUTPUT)test-libunwind.bin:
 	$(BUILD) -lelf
 
-test-libunwind-debug-frame.bin:
+$(OUTPUT)test-libunwind-debug-frame.bin:
 	$(BUILD) -lelf
 
-test-libaudit.bin:
+$(OUTPUT)test-libaudit.bin:
 	$(BUILD) -laudit
 
-test-libslang.bin:
+$(OUTPUT)test-libslang.bin:
 	$(BUILD) -I/usr/include/slang -lslang
 
-test-gtk2.bin:
+$(OUTPUT)test-gtk2.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
-test-gtk2-infobar.bin:
+$(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
 
 grep-libs  = $(filter -l%,$(1))
@@ -119,63 +120,63 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
 
-test-libperl.bin:
+$(OUTPUT)test-libperl.bin:
 	$(BUILD) $(FLAGS_PERL_EMBED)
 
-test-libpython.bin:
+$(OUTPUT)test-libpython.bin:
 	$(BUILD)
 
-test-libpython-version.bin:
+$(OUTPUT)test-libpython-version.bin:
 	$(BUILD)
 
-test-libbfd.bin:
+$(OUTPUT)test-libbfd.bin:
 	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
 
-test-liberty.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
+$(OUTPUT)test-liberty.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
 
-test-liberty-z.bin:
-	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
+$(OUTPUT)test-liberty-z.bin:
+	$(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
 
-test-cplus-demangle.bin:
+$(OUTPUT)test-cplus-demangle.bin:
 	$(BUILD) -liberty
 
-test-backtrace.bin:
+$(OUTPUT)test-backtrace.bin:
 	$(BUILD)
 
-test-timerfd.bin:
+$(OUTPUT)test-timerfd.bin:
 	$(BUILD)
 
-test-libdw-dwarf-unwind.bin:
+$(OUTPUT)test-libdw-dwarf-unwind.bin:
 	$(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
 
-test-libbabeltrace.bin:
+$(OUTPUT)test-libbabeltrace.bin:
 	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
 
-test-sync-compare-and-swap.bin:
+$(OUTPUT)test-sync-compare-and-swap.bin:
 	$(BUILD)
 
-test-compile-32.bin:
-	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-32.bin:
+	$(CC) -m32 -o $@ test-compile.c
 
-test-compile-x32.bin:
-	$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
+$(OUTPUT)test-compile-x32.bin:
+	$(CC) -mx32 -o $@ test-compile.c
 
-test-zlib.bin:
+$(OUTPUT)test-zlib.bin:
 	$(BUILD) -lz
 
-test-lzma.bin:
+$(OUTPUT)test-lzma.bin:
 	$(BUILD) -llzma
 
-test-get_cpuid.bin:
+$(OUTPUT)test-get_cpuid.bin:
 	$(BUILD)
 
-test-bpf.bin:
+$(OUTPUT)test-bpf.bin:
 	$(BUILD)
 
--include *.d
+-include $(OUTPUT)*.d
 
 ###############################
 
 clean:
-	rm -f $(FILES) *.d $(FILES:.bin=.make.output)
+	rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290830 — [PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 05:20 +0100
Subject[PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE
Message-ID<qFsMa-14g-15@gated-at.bofh.it>
In reply to#1290826
PERF_PAGER_IN_USE doesn't seem to be used anywhere, so let's remove it.

This will also make it easier to move pager.c into a separate library.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/perf/util/pager.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
index 53ef006..7dcbef6 100644
--- a/tools/perf/util/pager.c
+++ b/tools/perf/util/pager.c
@@ -85,11 +85,5 @@ void setup_pager(void)
 
 int pager_in_use(void)
 {
-	const char *env;
-
-	if (spawned_pager)
-		return 1;
-
-	env = getenv("PERF_PAGER_IN_USE");
-	return env ? perf_config_bool("PERF_PAGER_IN_USE", env) : 0;
+	return spawned_pager;
 }
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1294532 — [tip:perf/core] perf tools: Remove check for unused PERF_PAGER_IN_USE

Fromtip-bot for Josh Poimboeuf <tipbot@zytor.com>
Date2015-12-18 10:00 +0100
Subject[tip:perf/core] perf tools: Remove check for unused PERF_PAGER_IN_USE
Message-ID<qGZ3k-3mL-23@gated-at.bofh.it>
In reply to#1290830
Commit-ID:  a871a775172ac586b76199fd158e2843971bd052
Gitweb:     http://git.kernel.org/tip/a871a775172ac586b76199fd158e2843971bd052
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Sun, 13 Dec 2015 22:18:08 -0600
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Dec 2015 12:30:18 -0300

perf tools: Remove check for unused PERF_PAGER_IN_USE

PERF_PAGER_IN_USE doesn't seem to be used anywhere, so let's remove it.

This will also make it easier to move pager.c into a separate library.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/ed9e8370db9811746dc590544cf48c36dcfb1731.1449965119.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/pager.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
index 53ef006..7dcbef6 100644
--- a/tools/perf/util/pager.c
+++ b/tools/perf/util/pager.c
@@ -85,11 +85,5 @@ void setup_pager(void)
 
 int pager_in_use(void)
 {
-	const char *env;
-
-	if (spawned_pager)
-		return 1;
-
-	env = getenv("PERF_PAGER_IN_USE");
-	return env ? perf_config_bool("PERF_PAGER_IN_USE", env) : 0;
+	return spawned_pager;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290832 — [PATCH v3 05/17] perf build: Fix 'make clean'

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-12-14 05:30 +0100
Subject[PATCH v3 05/17] perf build: Fix 'make clean'
Message-ID<qFsVP-17V-3@gated-at.bofh.it>
In reply to#1290826
Add some missing files to the 'make clean' target.

Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/perf/Makefile.perf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 929a32b..906c723 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -582,15 +582,16 @@ $(INSTALL_DOC_TARGETS):
 #
 config-clean:
 	$(call QUIET_CLEAN, config)
-	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null
+	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null
 
 clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean config-clean
 	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
-	$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
+	$(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
 	$(Q)$(RM) $(OUTPUT).config-detected
 	$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
 	$(call QUIET_CLEAN, core-gen)   $(RM)  *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
-		$(OUTPUT)util/intel-pt-decoder/inat-tables.c
+		$(OUTPUT)util/intel-pt-decoder/inat-tables.c $(OUTPUT)fixdep \
+		$(OUTPUT)tests/llvm-src-{base,kbuild,prologue}.c
 	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
 	$(python-clean)
 
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291052 — Re: [PATCH v3 05/17] perf build: Fix 'make clean'

FromJiri Olsa <jolsa@redhat.com>
Date2015-12-14 11:20 +0100
SubjectRe: [PATCH v3 05/17] perf build: Fix 'make clean'
Message-ID<qFyoy-4Kh-27@gated-at.bofh.it>
In reply to#1290832
On Sun, Dec 13, 2015 at 10:18:05PM -0600, Josh Poimboeuf wrote:
> Add some missing files to the 'make clean' target.
> 
> Reported-by: Jiri Olsa <jolsa@redhat.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
>  tools/perf/Makefile.perf | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 929a32b..906c723 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -582,15 +582,16 @@ $(INSTALL_DOC_TARGETS):
>  #
>  config-clean:
>  	$(call QUIET_CLEAN, config)
> -	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null
> +	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null
>  
>  clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean config-clean
>  	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
> -	$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
> +	$(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
>  	$(Q)$(RM) $(OUTPUT).config-detected
>  	$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
>  	$(call QUIET_CLEAN, core-gen)   $(RM)  *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
> -		$(OUTPUT)util/intel-pt-decoder/inat-tables.c
> +		$(OUTPUT)util/intel-pt-decoder/inat-tables.c $(OUTPUT)fixdep \
> +		$(OUTPUT)tests/llvm-src-{base,kbuild,prologue}.c
>  	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
>  	$(python-clean)
>  
> -- 
> 2.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291255 — Re: [PATCH v3 05/17] perf build: Fix 'make clean'

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-14 16:20 +0100
SubjectRe: [PATCH v3 05/17] perf build: Fix 'make clean'
Message-ID<qFD4R-7Rv-1@gated-at.bofh.it>
In reply to#1291052
Em Mon, Dec 14, 2015 at 11:14:21AM +0100, Jiri Olsa escreveu:
> On Sun, Dec 13, 2015 at 10:18:05PM -0600, Josh Poimboeuf wrote:
> > Add some missing files to the 'make clean' target.
> > 
> > Reported-by: Jiri Olsa <jolsa@redhat.com>
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Applied.
 
> thanks,
> jirka
> 
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > ---
> >  tools/perf/Makefile.perf | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > index 929a32b..906c723 100644
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@ -582,15 +582,16 @@ $(INSTALL_DOC_TARGETS):
> >  #
> >  config-clean:
> >  	$(call QUIET_CLEAN, config)
> > -	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null
> > +	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null
> >  
> >  clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean config-clean
> >  	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
> > -	$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
> > +	$(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
> >  	$(Q)$(RM) $(OUTPUT).config-detected
> >  	$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
> >  	$(call QUIET_CLEAN, core-gen)   $(RM)  *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
> > -		$(OUTPUT)util/intel-pt-decoder/inat-tables.c
> > +		$(OUTPUT)util/intel-pt-decoder/inat-tables.c $(OUTPUT)fixdep \
> > +		$(OUTPUT)tests/llvm-src-{base,kbuild,prologue}.c
> >  	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
> >  	$(python-clean)
> >  
> > -- 
> > 2.4.3
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | linux.kernel


csiph-web