From d36742097bf971af8da9dbab6c9ee0d7088df4f9 Mon Sep 17 00:00:00 2001 From: Johannes Engel Date: Mon, 3 Dec 2007 08:52:57 +0100 Subject: [PATCH 1/1] Add uninstall target --- Makefile | 8 ++++++++ progs/Makefile | 3 +++ src/Makefile | 7 +++++++ src/glu/Makefile | 5 +++++ src/glut/glx/Makefile | 3 +++ src/glw/Makefile | 8 ++++++++ src/glx/x11/Makefile | 3 +++ src/mesa/Makefile | 11 +++++++++++ src/mesa/drivers/dri/Makefile | 6 ++++++ src/mesa/drivers/dri/Makefile.template | 2 ++ 10 files changed, 56 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index ac1e94e..5153f1d 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,13 @@ install: fi \ done +uninstall: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) uninstall) || exit 1 ; \ + fi \ + done + # DirectFBGL module installation linux-directfb-install: @@ -128,6 +135,7 @@ linux-sparc5 \ linux-static \ linux-ultrasparc \ linux-tcc \ +linux-wmaz \ linux-x86 \ linux-x86-debug \ linux-x86-32 \ diff --git a/progs/Makefile b/progs/Makefile index 5e705ef..236ade6 100644 --- a/progs/Makefile +++ b/progs/Makefile @@ -24,6 +24,9 @@ subdirs: # Dummy install target install: +# Dummy uninstall target +uninstall: + clean: @for dir in $(SUBDIRS) tests ; do \ if [ -d $$dir ] ; then \ diff --git a/src/Makefile b/src/Makefile index f93987e..56b6fa2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -28,6 +28,13 @@ install: fi \ done +uninstall: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) uninstall) || exit 1 ; \ + fi \ + done + $(TOP)/$(LIB_DIR): -mkdir $(TOP)/$(LIB_DIR) diff --git a/src/glu/Makefile b/src/glu/Makefile index 836baa6..8216445 100644 --- a/src/glu/Makefile +++ b/src/glu/Makefile @@ -27,6 +27,11 @@ install: glu.pc $(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) $(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig +uninstall: glu.pc + echo "rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/glu.pc" + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/glu.pc + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/libGLU.* + clean: @for dir in $(SUBDIRS) ; do \ (cd $$dir ; $(MAKE) clean) ; \ diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile index 9f99566..da7b06b 100644 --- a/src/glut/glx/Makefile +++ b/src/glut/glx/Makefile @@ -113,6 +113,9 @@ install: glut.pc $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig +uninstall: glut.pc + rm -rf $(DESTDIR)$(INSTALL_DIR)/include/GL/glut.h + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/glut.pc clean: -rm -f *.o *~ diff --git a/src/glw/Makefile b/src/glw/Makefile index 727c583..adeff65 100644 --- a/src/glw/Makefile +++ b/src/glw/Makefile @@ -41,6 +41,14 @@ install: glw.pc $(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) $(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig +uninstall: glw.pc + echo "Remove $(DESTDIR)$(INSTALL_DIR)/include/GL" + rm -rf $(DESTDIR)$(INSTALL_DIR)/include/GL + echo "Remove $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/glw.pc" + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/glw.pc + echo "Remove $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/libGLw.*" + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/libGLw.* + clean: -rm depend depend.bak -rm -f *.o *~ diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile index 00a568c..9ae67ab 100644 --- a/src/glx/x11/Makefile +++ b/src/glx/x11/Makefile @@ -83,6 +83,9 @@ tags: # Dummy install target install: +# Dummy uninstall target +uninstall: + # Remove .o and backup files clean: -rm -f $(TOP)/$(LIB_DIR)/libGL.so* diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 77bb7be..7b52a41 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -178,6 +178,17 @@ install: default gl.pc cd drivers/dri ; $(MAKE) install ; \ fi +uninstall: default gl.pc + rm -rf $(DESTDIR)$(INSTALL_DIR)/include/GL/*.h + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/libGL* + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig/gl.pc + @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \ + rm -rf $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/libOSMesa*; \ + fi + @if [ "${DRIVER_DIRS}" = "dri" ] ; then \ + cd drivers/dri ; $(MAKE) uninstall ; \ + fi + ## NOT INSTALLED YET: ## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES ## $(INSTALL) -m 644 include/GLES/*.h $(DESTDIR)$(INSTALL_DIR)/include/GLES diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile index f466ce6..b5dd551 100644 --- a/src/mesa/drivers/dri/Makefile +++ b/src/mesa/drivers/dri/Makefile @@ -28,6 +28,12 @@ install: fi \ done +uninstall: + @for dir in $(DRI_DIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) uninstall) || exit 1 ; \ + fi \ + done clean: @for dir in $(DRI_DIRS) ; do \ diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template index 6ed6fc1..917abc6 100644 --- a/src/mesa/drivers/dri/Makefile.template +++ b/src/mesa/drivers/dri/Makefile.template @@ -98,5 +98,7 @@ install: $(LIBNAME) $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) +uninstall: $(LIBNAME) + rm -rf $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)/$(LIBNAME) include depend -- 1.5.2.4