• Ian Rogers's avatar
    perf build: Don't propagate subdir to submakes for install_headers · f89fb557
    Ian Rogers authored
    subdir is added to the OUTPUT which fails as part of building
    install_headers when passed from "make -C tools perf_install".
    
    Committer testing:
    
    The original reporter (see the Link: below) had trouble with this:
    
    $ make -C tools perf_install
    
    That ended up with errors like this:
    
      /var/home/acme/git/perf-urgent/tools/scripts/Makefile.include:17: *** output directory "/var/home/acme/git/perf-urgent/tools/perf/libperf/perf/" does not exist.  Stop.
    
    With this patch applied we now get it installed at:
    
      INSTALL /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h
    
    As expected:
    
      $ ls -la /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h
      -rw-r--r--. 1 acme acme 1146 Jan  3 15:42 /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h
    
    And if we clean tools with:
    
      $ make -C tools clean
    
    it gets cleaned up:
    
      $ ls -la /var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h
      ls: cannot access '/var/home/acme/git/perf-urgent/tools/perf/libperf/include/perf/bpf_perf.h': No such file or directory
      $
    
    Fixes: 746bd29e ("perf build: Use tools/lib headers from install path")
    Reported-by: default avatarTorsten Hilbrich <torsten.hilbrich@secunet.com>
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/fa4b3115-d555-3d7f-54d1-018002e99350@secunet.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    f89fb557
Makefile.perf 40 KB