check if files exist before installing (Thierry Reding)
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 15 Oct 2006 16:38:09 +0000 (16:38 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 15 Oct 2006 16:38:09 +0000 (16:38 +0000)
src/mesa/Makefile

index d4645606f7f6ec38565d88d6b6cced45fa6e1234..e3a93921d709429e2a82d019bb18ae273687d549 100644 (file)
@@ -141,7 +141,7 @@ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECT
 depend: $(ALL_SOURCES)
        @ echo "running $(MKDEP)"
        @ touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+       @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
                > /dev/null 
 
 
@@ -154,7 +154,12 @@ 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
-       $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGL.* $(INSTALL_DIR)/$(LIB_DIR)
+       @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
+               $(COPY_LIBS) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)* $(INSTALL_DIR)/$(LIB_DIR); \
+       fi
+       @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
+               $(COPY_LIBS) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)* $(INSTALL_DIR)/$(LIB_DIR); \
+       fi
        @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
                cd drivers/dri ; $(MAKE) install ; \
        fi