Message ID | 20170218191310.1627-1-maxim.uvarov@linaro.org |
---|---|
State | Accepted |
Commit | 3d6cbd2e2881c1e18922b26c7fd4a2ec9464becd |
Headers | show |
This looks reasonable. On Sat, Feb 18, 2017 at 1:13 PM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > Commit: > 52f32ce1 linux-gen: abi: add symlink to arch specific dir > Fixed applications compilations for installed odp libs and includes > with adding symlink. But breaks make distcheck which creates that symlink > 2 times and fails on second one because is already exist and that dir does > not have write permissions. > Current patch skips symlink creation if it's already exist and repairs > distcheck. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > platform/linux-generic/Makefile.am | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am > index 04870283..9b053560 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -216,5 +216,9 @@ endif > # Create symlink for ABI header files. Application does not need to use the arch > # specific include path for installed files. > install-data-hook: > - $(LN_S) -r $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ > - $(prefix)/include/odp/api/abi > + if [ -h $(prefix)/include/odp/api/abi ]; then \ > + pass \ > + else \ > + $(LN_S) -rf $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ > + $(prefix)/include/odp/api/abi; \ > + fi > -- > 2.11.0.295.gd7dffce >
> -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Maxim > Uvarov > Sent: Saturday, February 18, 2017 9:13 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [PATCH] linux-gen: do not do double symlinks on make > distcheck > > Commit: > 52f32ce1 linux-gen: abi: add symlink to arch specific dir > Fixed applications compilations for installed odp libs and includes > with adding symlink. But breaks make distcheck which creates that symlink > 2 times and fails on second one because is already exist and that dir does > not have write permissions. > Current patch skips symlink creation if it's already exist and repairs > distcheck. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > platform/linux-generic/Makefile.am | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/platform/linux-generic/Makefile.am b/platform/linux- > generic/Makefile.am > index 04870283..9b053560 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -216,5 +216,9 @@ endif > # Create symlink for ABI header files. Application does not need to use > the arch > # specific include path for installed files. > install-data-hook: > - $(LN_S) -r $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ > - $(prefix)/include/odp/api/abi > + if [ -h $(prefix)/include/odp/api/abi ]; then \ > + pass \ > + else \ > + $(LN_S) -rf > $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ > + $(prefix)/include/odp/api/abi; \ > + fi > -- > 2.11.0.295.gd7dffce if [ -h <my_install_dir>/include/odp/api/abi ]; then \ pass \ else \ ln -s -rf <my_install_dir>/include/odp/arch/x86_64-linux/odp/api/abi \ < my_install_dir>/include/odp/api/abi; \ fi /bin/bash: line 2: pass: command not found Is 'pass' a valid program or shell command? At least, my system (Ubuntu 14.04) did not recognize it. Could you change the condition so that 'pass' branch is not needed, or just use 'echo' or some other dummy command there. -Petri
On 02/20/17 18:17, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > >> -----Original Message----- >> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Maxim >> Uvarov >> Sent: Saturday, February 18, 2017 9:13 PM >> To: lng-odp@lists.linaro.org >> Subject: [lng-odp] [PATCH] linux-gen: do not do double symlinks on make >> distcheck >> >> Commit: >> 52f32ce1 linux-gen: abi: add symlink to arch specific dir >> Fixed applications compilations for installed odp libs and includes >> with adding symlink. But breaks make distcheck which creates that symlink >> 2 times and fails on second one because is already exist and that dir does >> not have write permissions. >> Current patch skips symlink creation if it's already exist and repairs >> distcheck. >> >> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >> --- >> platform/linux-generic/Makefile.am | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/platform/linux-generic/Makefile.am b/platform/linux- >> generic/Makefile.am >> index 04870283..9b053560 100644 >> --- a/platform/linux-generic/Makefile.am >> +++ b/platform/linux-generic/Makefile.am >> @@ -216,5 +216,9 @@ endif >> # Create symlink for ABI header files. Application does not need to use >> the arch >> # specific include path for installed files. >> install-data-hook: >> - $(LN_S) -r $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ >> - $(prefix)/include/odp/api/abi >> + if [ -h $(prefix)/include/odp/api/abi ]; then \ >> + pass \ >> + else \ >> + $(LN_S) -rf >> $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ >> + $(prefix)/include/odp/api/abi; \ >> + fi >> -- >> 2.11.0.295.gd7dffce > > > if [ -h <my_install_dir>/include/odp/api/abi ]; then \ > pass \ > else \ > ln -s -rf <my_install_dir>/include/odp/arch/x86_64-linux/odp/api/abi \ > < my_install_dir>/include/odp/api/abi; \ > fi > /bin/bash: line 2: pass: command not found > > > Is 'pass' a valid program or shell command? At least, my system (Ubuntu 14.04) did not recognize it. Could you change the condition so that 'pass' branch is not needed, or just use 'echo' or some other dummy command there. > > -Petri > > Sorry, I just merged it. It passed locally and in CI. pass is bash internal command. I also use 14.04 it passed locally and in travis: https://travis-ci.org/Linaro/odp/builds/203451407 But looks like something changed and it became separate command. Google says that dummy bash operation is ":". Will send correction patch. Maxim.
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 04870283..9b053560 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -216,5 +216,9 @@ endif # Create symlink for ABI header files. Application does not need to use the arch # specific include path for installed files. install-data-hook: - $(LN_S) -r $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ - $(prefix)/include/odp/api/abi + if [ -h $(prefix)/include/odp/api/abi ]; then \ + pass \ + else \ + $(LN_S) -rf $(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \ + $(prefix)/include/odp/api/abi; \ + fi
Commit: 52f32ce1 linux-gen: abi: add symlink to arch specific dir Fixed applications compilations for installed odp libs and includes with adding symlink. But breaks make distcheck which creates that symlink 2 times and fails on second one because is already exist and that dir does not have write permissions. Current patch skips symlink creation if it's already exist and repairs distcheck. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/Makefile.am | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.11.0.295.gd7dffce