[Mesa-dev] [PATCH 12/19] mesa: Convert gl.pc to be generated by configure.

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


This saves a step of mashing variables around in our Makefile.
---
 configure.ac      |    1 +
 src/mesa/Makefile |   16 ++--------------
 src/mesa/gl.pc.in |    8 ++++----
 3 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/configure.ac b/configure.ac
index 862eff2..81e0933 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2183,6 +2183,7 @@ AC_CONFIG_FILES([configs/current
 		src/mesa/drivers/dri/radeon/Makefile
 		src/mesa/drivers/dri/swrast/Makefile
 		src/mesa/drivers/x11/Makefile
+		src/mesa/gl.pc
 		tests/Makefile
 		tests/glx/Makefile])
 
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index b17696d..7799676 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -167,18 +167,6 @@ pcedit = \
 	-e 's, at INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
 	-e 's, at VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
 
-
-gl_pcedit = sed \
-	$(pcedit) \
-	-e 's, at GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \
-	-e 's, at GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \
-	-e 's, at GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \
-	-e 's, at GLX_TLS@,$(GLX_TLS),' \
-	-e 's, at GL_LIB@,$(GL_LIB),'
-
-gl.pc: gl.pc.in
-	$(gl_pcedit) $< > $@
-
 osmesa_pcedit = sed \
 	$(pcedit) \
 	-e 's, at OSMESA_LIB@,$(OSMESA_LIB),' \
@@ -193,7 +181,7 @@ install-headers:
 	$(INSTALL) -m 644 $(TOP)/include/GL/*.h \
 		$(DESTDIR)$(INSTALL_INC_DIR)/GL
 
-install-libgl-pc: gl.pc install-headers
+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
@@ -220,7 +208,7 @@ clean:
 	-rm -f */*/*.o
 	-rm -f depend depend.bak libmesa.a libmesagallium.a
 	-rm -f drivers/*/*.o
-	-rm -f *.pc
+	-rm -f osmesa.pc
 	-rm -f $(BUILT_SOURCES)
 	- at cd drivers/dri && $(MAKE) clean
 	- at cd drivers/x11 && $(MAKE) clean
diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
index 2d3bc91..181724b 100644
--- a/src/mesa/gl.pc.in
+++ b/src/mesa/gl.pc.in
@@ -1,12 +1,12 @@
-prefix=@INSTALL_DIR@
+prefix=@prefix@
 exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
+libdir=@libdir@
+includedir=@includedir@
 
 Name: gl
 Description: Mesa OpenGL library
 Requires.private: @GL_PC_REQ_PRIV@
-Version: @VERSION@
+Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -l at GL_LIB@
 Libs.private: @GL_PC_LIB_PRIV@
 Cflags: -I${includedir} @GL_PC_CFLAGS@
-- 
1.7.10



More information about the mesa-dev mailing list