gtk-doc/: Simplily uninstall rule. Its closer to upstream and fixes #150331.
authorStefan Kost <ensonic@users.sourceforge.net>
Mon, 1 Dec 2008 09:00:15 +0000 (09:00 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Mon, 1 Dec 2008 09:00:15 +0000 (09:00 +0000)
Original commit message from CVS:
* gtk-doc-plugins.mak:
* gtk-doc.mak:
Simplily uninstall rule. Its closer to upstream and fixes #150331.

ChangeLog
gtk-doc-plugins.mak
gtk-doc.mak

index 27dafaf..51415f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-01  Stefan Kost  <ensonic@users.sf.net>
+
+       * gtk-doc-plugins.mak:
+       * gtk-doc.mak:
+         Simplily uninstall rule. Its closer to upstream and fixes #150331.
+
 2008-11-29  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
 
        * m4/glib-gettext.m4:
index f673a7f..59fcb73 100644 (file)
@@ -302,36 +302,12 @@ install-data-local:
            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \
        fi) 
 uninstall-local:
-       (installfiles=`echo ./html/*.html`; \
-       if test "$$installfiles" = './html/*.html'; \
-       then echo '-- Nothing to uninstall' ; \
+       if test -d $(DESTDIR)$(TARGET_DIR); then \
+         rm -rf $(DESTDIR)$(TARGET_DIR)/*; \
+         rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \
        else \
-         for i in $$installfiles; do \
-           rmfile=`basename $$i` ; \
-           echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
-           rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
-         done; \
-         pngfiles=`echo ./html/*.png`; \
-         if test "$$pngfiles" != './html/*.png'; then \
-           for i in $$pngfiles; do \
-             rmfile=`basename $$i` ; \
-             echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
-             rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
-           done; \
-         fi; \
-         echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
-         rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
-         if test -e $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
-           rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
-         fi; \
-         echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
-         rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
-               if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \
-                       echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \
-                       rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \
-               fi; \
-       fi) 
-       if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi; true
+         echo '-- Nothing to uninstall' ; \
+       fi;
 
 #
 # Checks
index 51fb176..7cb2279 100644 (file)
@@ -206,36 +206,13 @@ install-data-local:
            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \
        fi) 
 uninstall-local:
-       (installfiles=`echo ./html/*.html`; \
-       if test "$$installfiles" = './html/*.html'; \
-       then echo '-- Nothing to uninstall' ; \
+       if test -d $(DESTDIR)$(TARGET_DIR); then \
+         rm -rf $(DESTDIR)$(TARGET_DIR)/*; \
+         rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \
        else \
-         for i in $$installfiles; do \
-           rmfile=`basename $$i` ; \
-           echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
-           rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
-         done; \
-         pngfiles=`echo ./html/*.png`; \
-         if test "$$pngfiles" != './html/*.png'; then \
-           for i in $$pngfiles; do \
-             rmfile=`basename $$i` ; \
-             echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
-             rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
-           done; \
-         fi; \
-         echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
-         rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
-         if test -e $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
-           rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
-         fi; \
-         echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
-         rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
-               if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \
-                       echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \
-                       rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \
-               fi; \
-       fi) 
-       if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi; true
+         echo '-- Nothing to uninstall' ; \
+       fi;
+
 
 #
 # Require gtk-doc when making dist