From: Keith Whitwell Date: Fri, 7 Jan 2005 10:35:23 +0000 (+0000) Subject: Improve the semantics of the 'install' target to make sure the right X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8764441b58a2490600494a30ad40645982bcbbaa;p=mesa.git Improve the semantics of the 'install' target to make sure the right file is really being installed. Useful if you have multiple versions of a single driver directory hanging around and want to switch between them for testing. --- diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template index f2a9ec52dca..34d845b8e1e 100644 --- a/src/mesa/drivers/dri/Makefile.template +++ b/src/mesa/drivers/dri/Makefile.template @@ -64,7 +64,7 @@ DEFINES += -DGLX_DIRECT_RENDERING ##### TARGETS ##### -default: depend symlinks $(LIB_DIR)/$(LIBNAME) +default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME) #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile @@ -72,15 +72,19 @@ default: depend symlinks $(LIB_DIR)/$(LIBNAME) # $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \ # $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS) +$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template + rm -f $@ + gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS) -$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template - rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS) +$(LIB_DIR)/$(LIBNAME): $(LIBNAME) + install -C $(LIBNAME) $(LIB_DIR) # Run 'make depend' to update the dependencies if you change # what's included by any source file. +.PHONY: depend depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS) touch depend $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \ @@ -97,4 +101,7 @@ clean: -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS) -rm -f depend depend.bak +install: $(LIBNAME) + install -C $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME) + include depend