diff mbox series

[v1] tools: PCI: Fix installation when `make tools/pci_install`

Message ID 20190628133326.18203-1-andriy.shevchenko@linux.intel.com
State Superseded
Delegated to: Lorenzo Pieralisi
Headers show
Series [v1] tools: PCI: Fix installation when `make tools/pci_install` | expand

Commit Message

Andy Shevchenko June 28, 2019, 1:33 p.m. UTC
The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
fixed a `make tools clean` issue and simultaneously brought a regression
to the installation process:

  for script in .../tools/pci/pcitest.sh; do	\
	install $script .../usr/usr/bin;	\
  done
  install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory

Here is the missed part of the fix.

Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 tools/pci/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lorenzo Pieralisi July 5, 2019, 4:23 p.m. UTC | #1
On Fri, Jun 28, 2019 at 04:33:26PM +0300, Andy Shevchenko wrote:
> The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
> fixed a `make tools clean` issue and simultaneously brought a regression
> to the installation process:
> 
>   for script in .../tools/pci/pcitest.sh; do	\
> 	install $script .../usr/usr/bin;	\
>   done
>   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
> 
> Here is the missed part of the fix.

Sigh, hopefully that's the last fix :), Kishon if that's OK mind
ACKing it please ?

Thanks,
Lorenzo

> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  tools/pci/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/pci/Makefile b/tools/pci/Makefile
> index 6876ee4bd78c..cc4a161ee2cc 100644
> --- a/tools/pci/Makefile
> +++ b/tools/pci/Makefile
> @@ -47,10 +47,10 @@ clean:
>  
>  install: $(ALL_PROGRAMS)
>  	install -d -m 755 $(DESTDIR)$(bindir);		\
> -	for program in $(ALL_PROGRAMS) pcitest.sh; do	\
> +	for program in $(ALL_PROGRAMS); do		\
>  		install $$program $(DESTDIR)$(bindir);	\
>  	done;						\
> -	for script in $(ALL_SCRIPTS); do		\
> +	for script in pcitest.sh; do			\
>  		install $$script $(DESTDIR)$(bindir);	\
>  	done
>  
> -- 
> 2.20.1
>
Andy Shevchenko July 5, 2019, 5:08 p.m. UTC | #2
On Fri, Jul 05, 2019 at 05:23:58PM +0100, Lorenzo Pieralisi wrote:
> On Fri, Jun 28, 2019 at 04:33:26PM +0300, Andy Shevchenko wrote:
> > The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
> > fixed a `make tools clean` issue and simultaneously brought a regression
> > to the installation process:
> > 
> >   for script in .../tools/pci/pcitest.sh; do	\
> > 	install $script .../usr/usr/bin;	\
> >   done
> >   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
> > 
> > Here is the missed part of the fix.
> 
> Sigh, hopefully that's the last fix :), Kishon if that's OK mind
> ACKing it please ?

From my side, yes. Now it works as I expect.

Honestly, I'm puzzled how so many errors has been pushed upstream...
Kishon Vijay Abraham I July 9, 2019, 11:18 a.m. UTC | #3
Hi,

On 05/07/19 10:38 PM, Andy Shevchenko wrote:
> On Fri, Jul 05, 2019 at 05:23:58PM +0100, Lorenzo Pieralisi wrote:
>> On Fri, Jun 28, 2019 at 04:33:26PM +0300, Andy Shevchenko wrote:
>>> The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
>>> fixed a `make tools clean` issue and simultaneously brought a regression
>>> to the installation process:
>>>
>>>   for script in .../tools/pci/pcitest.sh; do	\
>>> 	install $script .../usr/usr/bin;	\
>>>   done
>>>   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
>>>
>>> Here is the missed part of the fix.
>>
>> Sigh, hopefully that's the last fix :), Kishon if that's OK mind
>> ACKing it please ?
> 
> From my side, yes. Now it works as I expect.
> 
> Honestly, I'm puzzled how so many errors has been pushed upstream...

I'm not sure why, but I don't see any issue without this patch as well. Am I
missing something here? I'm copy pasting the steps below.

a0393678@a0393678ub:~/repos/linux/tools/pci$ make clean
rm -f pcitest
rm -rf include/
find . -name '*.o' -delete -o -name '\.*.d' -delete
a0393678@a0393678ub:~/repos/linux/tools/pci$ make
mkdir -p include/linux/ 2>&1 || true
ln -sf /home/a0393678/repos/linux/tools/pci/../../include/uapi/linux/pcitest.h
include/linux/
make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
make[1]: Entering directory '/home/a0393678/repos/linux/tools/pci'
  CC       pcitest.o
  LD       pcitest-in.o
make[1]: Leaving directory '/home/a0393678/repos/linux/tools/pci'
  LINK     pcitest
a0393678@a0393678ub:~/repos/linux/tools/pci$ sudo make install
make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
install -d -m 755 /usr/bin;		\
for program in pcitest pcitest.sh; do	\
	install $program /usr/bin;	\
done;						\
for script in pcitest.sh; do		\
	install $script /usr/bin;	\
done
a0393678@a0393678ub:~/repos/linux/tools/pci$

Thanks
Kishon
Andy Shevchenko July 9, 2019, 11:38 a.m. UTC | #4
On Tue, Jul 09, 2019 at 04:48:57PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On 05/07/19 10:38 PM, Andy Shevchenko wrote:
> > On Fri, Jul 05, 2019 at 05:23:58PM +0100, Lorenzo Pieralisi wrote:
> >> On Fri, Jun 28, 2019 at 04:33:26PM +0300, Andy Shevchenko wrote:
> >>> The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
> >>> fixed a `make tools clean` issue and simultaneously brought a regression
> >>> to the installation process:
> >>>
> >>>   for script in .../tools/pci/pcitest.sh; do	\
> >>> 	install $script .../usr/usr/bin;	\
> >>>   done
> >>>   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
> >>>
> >>> Here is the missed part of the fix.
> >>
> >> Sigh, hopefully that's the last fix :), Kishon if that's OK mind
> >> ACKing it please ?
> > 
> > From my side, yes. Now it works as I expect.
> > 
> > Honestly, I'm puzzled how so many errors has been pushed upstream...
> 
> I'm not sure why, but I don't see any issue without this patch as well. Am I
> missing something here?

Yes.
I'm not contaminate my Linux kernel tree with any build stuff, so, I'm using
the folder which is out to the build, i.e.

% make O=/xyz ...

> I'm copy pasting the steps below.
> 
> a0393678@a0393678ub:~/repos/linux/tools/pci$ make clean
> rm -f pcitest
> rm -rf include/
> find . -name '*.o' -delete -o -name '\.*.d' -delete
> a0393678@a0393678ub:~/repos/linux/tools/pci$ make
> mkdir -p include/linux/ 2>&1 || true
> ln -sf /home/a0393678/repos/linux/tools/pci/../../include/uapi/linux/pcitest.h
> include/linux/
> make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
> make[1]: Entering directory '/home/a0393678/repos/linux/tools/pci'
>   CC       pcitest.o
>   LD       pcitest-in.o
> make[1]: Leaving directory '/home/a0393678/repos/linux/tools/pci'
>   LINK     pcitest
> a0393678@a0393678ub:~/repos/linux/tools/pci$ sudo make install
> make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
> install -d -m 755 /usr/bin;		\
> for program in pcitest pcitest.sh; do	\
> 	install $program /usr/bin;	\
> done;						\
> for script in pcitest.sh; do		\
> 	install $script /usr/bin;	\
> done
> a0393678@a0393678ub:~/repos/linux/tools/pci$
> 
> Thanks
> Kishon
Kishon Vijay Abraham I July 9, 2019, 11:43 a.m. UTC | #5
Hi,

On 09/07/19 5:08 PM, Andy Shevchenko wrote:
> On Tue, Jul 09, 2019 at 04:48:57PM +0530, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On 05/07/19 10:38 PM, Andy Shevchenko wrote:
>>> On Fri, Jul 05, 2019 at 05:23:58PM +0100, Lorenzo Pieralisi wrote:
>>>> On Fri, Jun 28, 2019 at 04:33:26PM +0300, Andy Shevchenko wrote:
>>>>> The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
>>>>> fixed a `make tools clean` issue and simultaneously brought a regression
>>>>> to the installation process:
>>>>>
>>>>>   for script in .../tools/pci/pcitest.sh; do	\
>>>>> 	install $script .../usr/usr/bin;	\
>>>>>   done
>>>>>   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
>>>>>
>>>>> Here is the missed part of the fix.
>>>>
>>>> Sigh, hopefully that's the last fix :), Kishon if that's OK mind
>>>> ACKing it please ?
>>>
>>> From my side, yes. Now it works as I expect.
>>>
>>> Honestly, I'm puzzled how so many errors has been pushed upstream...
>>
>> I'm not sure why, but I don't see any issue without this patch as well. Am I
>> missing something here?
> 
> Yes.
> I'm not contaminate my Linux kernel tree with any build stuff, so, I'm using
> the folder which is out to the build, i.e.
> 
> % make O=/xyz ...

Okay, got it.

Thanks
Kishon
> 
>> I'm copy pasting the steps below.
>>
>> a0393678@a0393678ub:~/repos/linux/tools/pci$ make clean
>> rm -f pcitest
>> rm -rf include/
>> find . -name '*.o' -delete -o -name '\.*.d' -delete
>> a0393678@a0393678ub:~/repos/linux/tools/pci$ make
>> mkdir -p include/linux/ 2>&1 || true
>> ln -sf /home/a0393678/repos/linux/tools/pci/../../include/uapi/linux/pcitest.h
>> include/linux/
>> make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
>> make[1]: Entering directory '/home/a0393678/repos/linux/tools/pci'
>>   CC       pcitest.o
>>   LD       pcitest-in.o
>> make[1]: Leaving directory '/home/a0393678/repos/linux/tools/pci'
>>   LINK     pcitest
>> a0393678@a0393678ub:~/repos/linux/tools/pci$ sudo make install
>> make -f /home/a0393678/repos/linux/tools/build/Makefile.build dir=. obj=pcitest
>> install -d -m 755 /usr/bin;		\
>> for program in pcitest pcitest.sh; do	\
>> 	install $program /usr/bin;	\
>> done;						\
>> for script in pcitest.sh; do		\
>> 	install $script /usr/bin;	\
>> done
>> a0393678@a0393678ub:~/repos/linux/tools/pci$
>>
>> Thanks
>> Kishon
>
Kishon Vijay Abraham I July 9, 2019, 11:45 a.m. UTC | #6
Hi Andy,

On 28/06/19 7:03 PM, Andy Shevchenko wrote:
> The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'")
> fixed a `make tools clean` issue and simultaneously brought a regression
> to the installation process:
> 
>   for script in .../tools/pci/pcitest.sh; do	\
> 	install $script .../usr/usr/bin;	\
>   done
>   install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory
> 
> Here is the missed part of the fix.
> 
> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  tools/pci/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/pci/Makefile b/tools/pci/Makefile
> index 6876ee4bd78c..cc4a161ee2cc 100644
> --- a/tools/pci/Makefile
> +++ b/tools/pci/Makefile
> @@ -47,10 +47,10 @@ clean:
>  
>  install: $(ALL_PROGRAMS)
>  	install -d -m 755 $(DESTDIR)$(bindir);		\
> -	for program in $(ALL_PROGRAMS) pcitest.sh; do	\
> +	for program in $(ALL_PROGRAMS); do		\
>  		install $$program $(DESTDIR)$(bindir);	\
>  	done;						\
> -	for script in $(ALL_SCRIPTS); do		\
> +	for script in pcitest.sh; do			\

If ALL_SCRIPTS is not used anywhere else, this patch can remove that as well.
With that fixed

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>

Thanks
Kishon
diff mbox series

Patch

diff --git a/tools/pci/Makefile b/tools/pci/Makefile
index 6876ee4bd78c..cc4a161ee2cc 100644
--- a/tools/pci/Makefile
+++ b/tools/pci/Makefile
@@ -47,10 +47,10 @@  clean:
 
 install: $(ALL_PROGRAMS)
 	install -d -m 755 $(DESTDIR)$(bindir);		\
-	for program in $(ALL_PROGRAMS) pcitest.sh; do	\
+	for program in $(ALL_PROGRAMS); do		\
 		install $$program $(DESTDIR)$(bindir);	\
 	done;						\
-	for script in $(ALL_SCRIPTS); do		\
+	for script in pcitest.sh; do			\
 		install $$script $(DESTDIR)$(bindir);	\
 	done