[openib-general] [PATCH] opensm: respect DESTDIR in install hook

Michael S. Tsirkin mst at mellanox.co.il
Sun Nov 27 10:26:03 PST 2005


osm makefile adds an install hook which doesnt respect the
DESTDIR variable, making it hard to build RPMs.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: trunk/src/userspace/management/osm/Makefile.am
===================================================================
--- trunk/src/userspace/management/osm/Makefile.am	2005-08-15 19:10:22.000000000 +0300
+++ trunk/src/userspace/management/osm/Makefile.am	2005-11-16 15:32:26.000000000 +0200
@@ -9,8 +9,9 @@
 
 # we should provide a hint for other apps about the build mode of this project
 install-exec-hook:
+	mkdir -p $(DESTDIR)/$(includedir)
 if DEBUG
-	echo "define osm_build_type \"debug\"" > $(includedir)/infiniband/opensm/osm_build_id.h
+	echo "define osm_build_type \"debug\"" > $(DESTDIR)/$(includedir)/infiniband/opensm/osm_build_id.h
 else
-	echo "define osm_build_type \"free\"" > $(includedir)/infiniband/opensm/osm_build_id.h
+	echo "define osm_build_type \"free\"" > $(DESTDIR)/$(includedir)/infiniband/opensm/osm_build_id.h
 endif

-- 
MST



More information about the general mailing list