From e8c2b9967f22a672753b2662f7858734ec328b06 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 7 May 2008 07:48:29 -0700 Subject: [PATCH] Refactor installation targets Currently, there is a single path in src/mesa/Makefile to install that has a few conditionals in it. This commit changes install to act like default where we loop over $(DRIVER_DIRS), deciding what to do. A new target, install-headers, has been broken out to accomodate installing a standalone OSMesa where neither libGL or gl.pc are wanted. --- src/mesa/Makefile | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 7568390..4d834dd 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -37,6 +37,19 @@ default: depend esac ; \ done +install: default + @for driver in $(DRIVER_DIRS) ; do \ + case "$$driver" in \ + osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \ + $(MAKE) install-headers install-osmesa || exit 1 ; \ + else \ + $(MAKE) install-osmesa || exit 1 ; \ + fi ;; \ + dri) $(MAKE) install-libgl install-dri || exit 1 ;; \ + *) $(MAKE) install-libgl || exit 1 ;; \ + esac ; \ + done + ###################################################################### # BeOS driver target @@ -160,31 +173,25 @@ pcedit = sed \ gl.pc: gl.pc.in $(pcedit) $< > $@ -install-libgl: gl.pc +install-headers: $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL + $(INSTALL) -m 644 $(TOP)/include/GL/*.h \ + $(DESTDIR)$(INSTALL_DIR)/include/GL + +install-libgl: default gl.pc install-headers $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig - $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL - @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \ - $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* \ - $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \ - fi + $(INSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)* \ + $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig -install-osmesa: - @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \ - $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* \ - $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \ - fi - -install-drivers: - @for target in $(DRIVER_DIRS); do \ - case "$$target" in \ - dri) (cd drivers/dri && $(MAKE) install) || exit 1 ;; \ - esac; \ - done +install-osmesa: default + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) + $(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)* \ + $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) -install: default install-libgl install-osmesa install-drivers +install-dri: + cd drivers/dri && $(MAKE) install ## NOT INSTALLED YET: ## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES -- 2.7.4