On (25/02/15 19:19), Pavel Reichl wrote:
On 02/25/2015 05:43 PM, Lukas Slebodnik wrote:
>ehlo,
>
>attached patch should fix PavelR's issue with make install
>
>LS
>
>
Thanks. It indeed fixes my problem. Code looks good to me.
Only nitpick I noticed is that calling make uninstall twice fails, as there
are no file to be unlinked.
Would you consider amending the patch?
diff --git a/Makefile.am b/Makefile.am
index 096d422..88a8720 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3192,17 +3192,17 @@ uninstall-hook:
done;
if BUILD_PYTHON2_BINDINGS
cd $(DESTDIR)$(py2execdir) && \
- unlink pysss.so ; \
- unlink pyhbac.so ; \
- unlink pysss_murmur.so ; \
- unlink pysss_nss_idmap.so
+ [ ! -e pysss.so ] || unlink pysss.so ; \
+ [ ! -e pyhbac.so ] || unlink pyhbac.so ; \
+ [ ! -e pysss_murmur.so ] || unlink pysss_murmur.so ; \
+ [ ! -e pysss_nss_idmap.so ] || unlink pysss_nss_idmap.so
endif
if BUILD_PYTHON3_BINDINGS
cd $(DESTDIR)$(py3execdir) && \
- unlink pysss.so ; \
- unlink pyhbac.so ; \
- unlink pysss_murmur.so ; \
- unlink pysss_nss_idmap.so
+ [ ! -e pysss.so ] || unlink pysss.so ; \
+ [ ! -e pyhbac.so ] || unlink pyhbac.so ; \
+ [ ! -e pysss_murmur.so ] || unlink pysss_murmur.so ; \
+ [ ! -e pysss_nss_idmap.so ] || unlink pysss_nss_idmap.so
I'm
sorry but that's ugly.
I consulted it with our POSIX expert and it is safe to use "rm -f" for removing
symbolic links.
Updated version is attached.
LS