tools pci: Do not delete pcitest.sh in 'make clean'
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 13 May 2019 17:53:20 +0000 (13:53 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 May 2019 19:36:46 +0000 (16:36 -0300)
commitc9a7078750531c189c04ddd184c4367a5cb77780
tree11fddaead24a530f4dda414d475b549da76aadc3
parent0ceb5499a8001e5ddac2c8bd7b45eb4c643469ad
tools pci: Do not delete pcitest.sh in 'make clean'

When running 'make -C tools clean' I noticed that a revision controlled
file was being deleted:

  $ git diff
  diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh
  deleted file mode 100644
  index 75ed48ff2990..000000000000
  --- a/tools/pci/pcitest.sh
  +++ /dev/null
  @@ -1,72 +0,0 @@
  -#!/bin/sh
  -# SPDX-License-Identifier: GPL-2.0
  -
  -echo "BAR tests"
  -echo
  <SNIP>

So I changed the make variables to fix that, testing it should produce
the same intended result while not deleting revision controlled files.

  $ make O=/tmp/build/pci -C tools/pci install
  make: Entering directory '/home/acme/git/perf/tools/pci'
  make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=pcitest
  install -d -m 755 /usr/bin; \
  for program in /tmp/build/pci/pcitest pcitest.sh; do \
   install $program /usr/bin; \
  done
  install: cannot change permissions of ‘/usr/bin’: Operation not permitted
  install: cannot create regular file '/usr/bin/pcitest': Permission denied
  install: cannot create regular file '/usr/bin/pcitest.sh': Permission denied
  make: *** [Makefile:46: install] Error 1
  make: Leaving directory '/home/acme/git/perf/tools/pci'
  $ ls -la /tmp/build/pci/pcitest
  -rwxrwxr-x. 1 acme acme 27152 May 13 13:52 /tmp/build/pci/pcitest
  $ /tmp/build/pci/pcitest
  can't open PCI Endpoint Test device: No such file or directory
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 1ce78ce09430 ("tools: PCI: Change pcitest compiling process")
Link: https://lkml.kernel.org/n/tip-9re6bd7eh9epi3koslkv3ocn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/pci/Makefile