When installing a package, it is often useful to place the contents in
a temporary staging directory. The customary way to support this installation
style is through the variable DESTDIR. When set during `make install', it
will prepend this path to all installed contents.
---
Dan

 docs/install.html                      |    4 +++-
 src/glu/Makefile                       |    4 ++--
 src/glut/fbdev/Makefile                |    8 ++++----
 src/glut/glx/Makefile                  |    8 ++++----
 src/glw/Makefile                       |    8 ++++----
 src/mesa/Makefile                      |   14 +++++++-------
 src/mesa/drivers/dri/Makefile.template |    4 ++--
 7 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/docs/install.html b/docs/install.html
index 804dee5..b87c4d8 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -287,7 +287,9 @@ already installed, you'll have to choose different 
directories, like
 To install Mesa's headers and libraries, run <code>make install</code>.
 But first, check the Mesa/configs/default file and examine the values
 of the <b>INSTALL_DIR</b> and <b>DRI_DRIVER_INSTALL_DIR</b> variables.
-Change them if needed, then run <code>make install</code>
+Change them if needed, then run <code>make install</code>. The variable
+<b>DESTDIR</b> may also be used to install the contents to a temporary
+staging directory. This can be useful for package management.
 </p>
 
 <p>
diff --git a/src/glu/Makefile b/src/glu/Makefile
index 5ddc509..b8c55db 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -14,8 +14,8 @@ default: $(TOP)/configs/current
        done
 
 install:
-       $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
-       $(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
 
 clean:
        @for dir in $(SUBDIRS) ; do \
diff --git a/src/glut/fbdev/Makefile b/src/glut/fbdev/Makefile
index 254ff8c..d84d52e 100644
--- a/src/glut/fbdev/Makefile
+++ b/src/glut/fbdev/Makefile
@@ -69,10 +69,10 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
                $(MKLIB_OPTIONS) $(OBJECTS)
 
 install:
-       $(INSTALL) -d $(INSTALL_DIR)/include/GL
-       $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
-       $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
-       $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -m 644 $(TOP)/include/GL/glut.h 
$(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
 
 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
 # what's included by any source file.
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 7e1d56b..b236c6f 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -97,10 +97,10 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
 
 
 install:
-       $(INSTALL) -d $(INSTALL_DIR)/include/GL
-       $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
-       $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
-       $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -m 644 $(TOP)/include/GL/glut.h 
$(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
 
 
 clean:
diff --git a/src/glw/Makefile b/src/glw/Makefile
index 5228cbb..778ffb0 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -26,10 +26,10 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
 default: $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME)
 
 install:
-       $(INSTALL) -d $(INSTALL_DIR)/include/GL
-       $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
-       $(INSTALL) -m 644 *.h $(INSTALL_DIR)/include/GL
-       $(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* $(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+       $(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
 
 clean:
        -rm depend depend.bak
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 6943219..a50e826 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -149,22 +149,22 @@ subdirs:
 
 
 install: default
-       $(INSTALL) -d $(INSTALL_DIR)/include/GL
-       $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
-       $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+       $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+       $(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* $(INSTALL_DIR)/$(LIB_DIR); \
+               $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
        fi
        @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
-               $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* 
$(INSTALL_DIR)/$(LIB_DIR); \
+               $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* 
$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
        fi
        @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
                cd drivers/dri ; $(MAKE) install ; \
        fi
 
 ## NOT INSTALLED YET:
-## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
-## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
+## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
+## $(INSTALL) -m 644 include/GLES/*.h $(DESTDIR)$(INSTALL_DIR)/include/GLES
 
 
 # Emacs tags
diff --git a/src/mesa/drivers/dri/Makefile.template 
b/src/mesa/drivers/dri/Makefile.template
index adf30ef..3576d0b 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -95,8 +95,8 @@ clean:
 
 
 install: $(LIBNAME)
-       $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
-       $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
+       $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+       $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
 
 
 include depend
-- 
1.5.2.4

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to