diff options
author | Dan Nicholson <[email protected]> | 2008-05-07 07:48:29 -0700 |
---|---|---|
committer | Dan Nicholson <[email protected]> | 2008-05-07 07:48:29 -0700 |
commit | e8c2b9967f22a672753b2662f7858734ec328b06 (patch) | |
tree | ef09f054cfc6fe7d2752a69b2019b8fe77d624ce | |
parent | ec813878e4889be97535cf01bd2b49fd09467a47 (diff) |
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.
-rw-r--r-- | src/mesa/Makefile | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 75683908625..4d834dd1572 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 |