summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2009-05-22 09:39:02 -0700
committerDan Nicholson <dbn.lists@gmail.com>2009-06-01 06:32:52 -0700
commitbc302b2a33ceffe454bcf443daa0ac1edc118e9b (patch)
treeb3ef47e16a5479963a12bf2585cadfa54539d035
parent85e0572756b85b7025740fbbefb673cf75a46cea (diff)
Use separate $(MINSTALL) for installing libraries
The special feature of bin/minstall to copy symlinks is only ever needed when installing libraries which may have .so symlinks. All the headers and directories can use a normal install program. These two modes are separated as $(INSTALL) and $(MINSTALL) to allow the user (or autoconf) to override installing normal files as they please. An autoconf check for the install program has been added and will be used in preference to minstall when available. Fixes bug 16053.
-rw-r--r--configs/autoconf.in1
-rw-r--r--configs/default5
-rw-r--r--configure.ac5
-rw-r--r--src/egl/drivers/dri/Makefile2
-rw-r--r--src/egl/drivers/glx/Makefile2
-rw-r--r--src/egl/drivers/xdri/Makefile2
-rw-r--r--src/egl/main/Makefile2
-rw-r--r--src/gallium/winsys/drm/Makefile.template2
-rw-r--r--src/gallium/winsys/drm/intel/xorg/Makefile2
-rw-r--r--src/gallium/winsys/drm/radeon/xorg/Makefile2
-rw-r--r--src/gallium/winsys/egl_xlib/Makefile2
-rw-r--r--src/gallium/winsys/xlib/Makefile2
-rw-r--r--src/glu/Makefile2
-rw-r--r--src/glut/fbdev/Makefile2
-rw-r--r--src/glut/glx/Makefile2
-rw-r--r--src/glut/mini/Makefile2
-rw-r--r--src/glw/Makefile2
-rw-r--r--src/mesa/Makefile4
-rw-r--r--src/mesa/drivers/dri/Makefile.template2
19 files changed, 27 insertions, 18 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index b61d7f33f0..77422e3fe5 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -31,6 +31,7 @@ SHELL = @SHELL@
MKLIB_OPTIONS = @MKLIB_OPTIONS@
MKDEP = @MKDEP@
MKDEP_OPTIONS = @MKDEP_OPTIONS@
+INSTALL = @INSTALL@
# Python and flags (generally only needed by the developers)
PYTHON2 = python
diff --git a/configs/default b/configs/default
index d2ea3b2487..dc28be37dd 100644
--- a/configs/default
+++ b/configs/default
@@ -36,7 +36,10 @@ MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
-INSTALL = $(SHELL) $(TOP)/bin/minstall
+
+# Use MINSTALL for installing libraries, INSTALL for everything else
+MINSTALL = $(SHELL) $(TOP)/bin/minstall
+INSTALL = $(MINSTALL)
# Tools for regenerating glapi (generally only needed by the developers)
PYTHON2 = python
diff --git a/configure.ac b/configure.ac
index 24aa13a7ca..772fb29973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,11 @@ AC_CHECK_PROGS([MAKE], [gmake make])
AC_PATH_PROG([MKDEP], [makedepend])
AC_PATH_PROG([SED], [sed])
+dnl Our fallback install-sh is a symlink to minstall. Use the existing
+dnl configuration in that case.
+AC_PROG_INSTALL
+test "x$INSTALL" = "x$ac_install_sh" && INSTALL='$(MINSTALL)'
+
dnl We need a POSIX shell for parts of the build. Assume we have one
dnl in most cases.
case "$host_os" in
diff --git a/src/egl/drivers/dri/Makefile b/src/egl/drivers/dri/Makefile
index 4041d5c906..567edfae97 100644
--- a/src/egl/drivers/dri/Makefile
+++ b/src/egl/drivers/dri/Makefile
@@ -50,7 +50,7 @@ $(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
install:
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) $(TOP)/$(LIB_DIR)/libEGLdri.so $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/libEGLdri.so $(DESTDIR)$(INSTALL_LIB_DIR)
clean:
-rm -f *.o
diff --git a/src/egl/drivers/glx/Makefile b/src/egl/drivers/glx/Makefile
index 5f041a268f..20ef0352ad 100644
--- a/src/egl/drivers/glx/Makefile
+++ b/src/egl/drivers/glx/Makefile
@@ -58,7 +58,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS)
install:
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
clean:
rm -f *.o
diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile
index eb83867b71..8a14027fc7 100644
--- a/src/egl/drivers/xdri/Makefile
+++ b/src/egl/drivers/xdri/Makefile
@@ -54,7 +54,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS)
install:
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
clean:
rm -f *.o
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index 8cfa25ca16..cddba9f088 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -66,7 +66,7 @@ $(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
install: default
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) $(TOP)/$(LIB_DIR)/libEGL.so* $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/libEGL.so* $(DESTDIR)$(INSTALL_LIB_DIR)
clean:
-rm -f *.o *.so*
diff --git a/src/gallium/winsys/drm/Makefile.template b/src/gallium/winsys/drm/Makefile.template
index 9f92cb4207..985e5a861f 100644
--- a/src/gallium/winsys/drm/Makefile.template
+++ b/src/gallium/winsys/drm/Makefile.template
@@ -118,7 +118,7 @@ clean:
install: $(LIBNAME)
$(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
include depend
diff --git a/src/gallium/winsys/drm/intel/xorg/Makefile b/src/gallium/winsys/drm/intel/xorg/Makefile
index b1b6b9362b..d9aa5d54e1 100644
--- a/src/gallium/winsys/drm/intel/xorg/Makefile
+++ b/src/gallium/winsys/drm/intel/xorg/Makefile
@@ -39,6 +39,6 @@ clean:
install:
$(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
.PHONY = all clean install
diff --git a/src/gallium/winsys/drm/radeon/xorg/Makefile b/src/gallium/winsys/drm/radeon/xorg/Makefile
index 6ffd4a3a54..0241625f69 100644
--- a/src/gallium/winsys/drm/radeon/xorg/Makefile
+++ b/src/gallium/winsys/drm/radeon/xorg/Makefile
@@ -37,6 +37,6 @@ clean:
install:
$(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(TARGET) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
.PHONY = all clean install
diff --git a/src/gallium/winsys/egl_xlib/Makefile b/src/gallium/winsys/egl_xlib/Makefile
index 8646ee3b52..a33a50ec22 100644
--- a/src/gallium/winsys/egl_xlib/Makefile
+++ b/src/gallium/winsys/egl_xlib/Makefile
@@ -74,7 +74,7 @@ depend: $(ALL_SOURCES)
install: default
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
@if [ -e $(TOP)/$(LIB_DIR) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(INSTALL_DIR)/$(LIB_DIR); \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(INSTALL_DIR)/$(LIB_DIR); \
fi
diff --git a/src/gallium/winsys/xlib/Makefile b/src/gallium/winsys/xlib/Makefile
index 04309e67ee..522f6dc5ae 100644
--- a/src/gallium/winsys/xlib/Makefile
+++ b/src/gallium/winsys/xlib/Makefile
@@ -90,7 +90,7 @@ install: default
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
@if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \
fi
diff --git a/src/glu/Makefile b/src/glu/Makefile
index 5c26ead1bb..b268265976 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -30,7 +30,7 @@ glu.pc: glu.pc.in
install: glu.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLU_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLU_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
clean:
diff --git a/src/glut/fbdev/Makefile b/src/glut/fbdev/Makefile
index 199d8c390a..c150ea88dc 100644
--- a/src/glut/fbdev/Makefile
+++ b/src/glut/fbdev/Makefile
@@ -72,7 +72,7 @@ install:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_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 1b072906c7..6889cd4b40 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -117,7 +117,7 @@ install: glut.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile
index 0e42436133..b82a758d2c 100644
--- a/src/glut/mini/Makefile
+++ b/src/glut/mini/Makefile
@@ -91,7 +91,7 @@ install: glut.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
diff --git a/src/glw/Makefile b/src/glw/Makefile
index d88d773313..1fb3d3c320 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -43,7 +43,7 @@ install: glw.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
$(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLW_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLW_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
clean:
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index bb18bee8ea..8300b30144 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -129,14 +129,14 @@ install-headers:
install-libgl: default gl.pc install-headers
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
install-osmesa: default osmesa.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 5c01d233c1..bd38e3be47 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -92,7 +92,7 @@ clean:
install: $(LIBNAME)
$(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-include depend