[openib-general] Re: [PATCH] opensm: respect DESTDIR in install hook
Michael S. Tsirkin
mst at mellanox.co.il
Mon Nov 28 05:50:54 PST 2005
Quoting Hal Rosenstock <halr at voltaire.com>:
> > osm makefile adds an install hook which doesnt respect the
> > DESTDIR variable, making it hard to build RPMs.
>
> Thanks. Applied.
Here's another one:
---
Make osm makefiles respect DESTDIR.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: trunk/src/userspace/management/osm/complib/Makefile.am
===================================================================
--- trunk/src/userspace/management/osm/complib/Makefile.am 2005-09-12 23:10:17.000000000 +0300
+++ trunk/src/userspace/management/osm/complib/Makefile.am 2005-11-17 17:16:05.000000000 +0200
@@ -97,6 +97,6 @@
# that it will mark it with an alias...
# we find the new lib by traversing the links
install-exec-hook:
- if test -L $(libdir)/libosmcomp-$(VERSION).so; then rm $(libdir)/libosmcomp-$(VERSION).so; fi; \
- lname=`\ls -l $(libdir)/libosmcomp.so | awk '{print $$NF}'`; \
- ln -s $$lname $(libdir)/libosmcomp-$(VERSION).so
+ if test -L $(DESTDIR)/$(libdir)/libosmcomp-$(VERSION).so; then rm $(DESTDIR)/$(libdir)/libosmcomp-$(VERSION).so; fi; \
+ lname=`\ls -l $(DESTDIR)/$(libdir)/libosmcomp.so | awk '{print $$NF}'`; \
+ ln -s $$lname $(DESTDIR)/$(libdir)/libosmcomp-$(VERSION).so
Index: trunk/src/userspace/management/osm/libvendor/Makefile.am
===================================================================
--- trunk/src/userspace/management/osm/libvendor/Makefile.am 2005-09-12 23:10:17.000000000 +0300
+++ trunk/src/userspace/management/osm/libvendor/Makefile.am 2005-11-17 17:16:43.000000000 +0200
@@ -91,6 +91,6 @@
# that it will mark it with an alias...
# we find the new lib by traversing the links
install-exec-hook:
- if test -L $(libdir)/libosmvendor-$(VERSION).so; then rm $(libdir)/libosmvendor-$(VERSION).so; fi; \
- lname=`\ls -l $(libdir)/libosmvendor.so | awk '{print $$NF}'`; \
- ln -s $$lname $(libdir)/libosmvendor-$(VERSION).so
+ if test -L $(DESTDIR)/$(libdir)/libosmvendor-$(VERSION).so; then rm $(DESTDIR)/$(libdir)/libosmvendor-$(VERSION).so; fi; \
+ lname=`\ls -l $(DESTDIR)/$(libdir)/libosmvendor.so | awk '{print $$NF}'`; \
+ ln -s $$lname $(DESTDIR)/$(libdir)/libosmvendor-$(VERSION).so
Index: trunk/src/userspace/management/osm/opensm/Makefile.am
===================================================================
--- trunk/src/userspace/management/osm/opensm/Makefile.am 2005-10-25 00:56:34.000000000 +0200
+++ trunk/src/userspace/management/osm/opensm/Makefile.am 2005-11-17 17:17:38.000000000 +0200
@@ -102,6 +102,6 @@
# that it will mark it with an alias...
# we find the new lib by traversing the links
install-exec-hook:
- if test -L $(libdir)/libopensm-$(VERSION).so; then rm $(libdir)/libopensm-$(VERSION).so; fi; \
- lname=`\ls -l $(libdir)/libopensm.so | awk '{print $$NF}'`; \
- ln -s $$lname $(libdir)/libopensm-$(VERSION).so
+ if test -L $(DESTDIR)/$(libdir)/libopensm-$(VERSION).so; then rm $(DESTDIR)/$(libdir)/libopensm-$(VERSION).so; fi; \
+ lname=`\ls -l $(DESTDIR)/$(libdir)/libopensm.so | awk '{print $$NF}'`; \
+ ln -s $$lname $(DESTDIR)/$(libdir)/libopensm-$(VERSION).so
--
MST
More information about the general
mailing list