[Mesa-dev] [PATCH 15/19] automake: Move .pc installation to automake.

Eric Anholt eric at anholt.net
Wed Jun 13 10:31:08 PDT 2012


---
 src/mesa/Makefile.am  |    8 ++++++++
 src/mesa/Makefile.old |   12 ++----------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index b877b5d..6335042 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -27,3 +27,11 @@ install-exec-local:
 
 clean-local:
 	$(MAKE) -f Makefile.old clean
+
+pkgconfigdir = $(libdir)/pkgconfig
+
+if HAVE_OSMESA_DRIVER
+pkgconfig_DATA = osmesa.pc
+else
+pkgconfig_DATA = gl.pc
+endif
diff --git a/src/mesa/Makefile.old b/src/mesa/Makefile.old
index c500a8c..7c85553 100644
--- a/src/mesa/Makefile.old
+++ b/src/mesa/Makefile.old
@@ -156,8 +156,8 @@ install: default $(DRICORE_INSTALL_TARGET)
 	            else \
 	              $(MAKE) -f Makefile.old install-osmesa || exit 1 ; \
 	            fi ;; \
-	    dri)    $(MAKE) -f Makefile.old install-libgl-pc install-dri || exit 1 ;; \
-	    *)      $(MAKE) -f Makefile.old install-libgl-pc || exit 1 ;; \
+	    dri)    $(MAKE) -f Makefile.old install-headers install-dri || exit 1 ;; \
+	    *)      $(MAKE) -f Makefile.old install-headers || exit 1 ;; \
 	  esac ; \
 	done
 
@@ -166,17 +166,9 @@ install-headers:
 	$(INSTALL) -m 644 $(TOP)/include/GL/*.h \
 		$(DESTDIR)$(INSTALL_INC_DIR)/GL
 
-install-libgl-pc: install-headers
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-	$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
 install-osmesa: default
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
 	$(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
 		$(DESTDIR)$(INSTALL_LIB_DIR)
-	$(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
 
 install-dri: default
 	cd drivers/dri && $(MAKE) install
-- 
1.7.10



More information about the mesa-dev mailing list