]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: hello-csharp*: Improve 'make maintainer-clean'.
authorBruno Haible <bruno@clisp.org>
Thu, 18 Oct 2018 18:19:47 +0000 (20:19 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Oct 2018 19:16:58 +0000 (21:16 +0200)
* gettext-tools/examples/hello-csharp*/po/Makefile.am (MAINTAINERCLEANFILES):
Don't list the $(RESOURCESDLLFILES) here.
(maintainer-clean-local): Instead, remove them and their parent directories
here.

gettext-tools/examples/hello-csharp-forms/po/Makefile.am
gettext-tools/examples/hello-csharp/po/Makefile.am

index 80d1e503aea7993dc8d1ad4ad859e4420f2bf556..56279c59b7f66d7d2e33ce2ef8f5ee6101f5d50b 100644 (file)
@@ -216,7 +216,15 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(RESOURCESDLLFILES)
+MAINTAINERCLEANFILES = stamp-po
+maintainer-clean-local:
+       if test -n "$(RESOURCESDLLFILES)"; then \
+         for file in $(RESOURCESDLLFILES); do \
+           rm -f "$$file"; \
+           dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$$dir"; then rmdir "$$dir"; fi; \
+         done; \
+       fi
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES)
 
index 80d1e503aea7993dc8d1ad4ad859e4420f2bf556..56279c59b7f66d7d2e33ce2ef8f5ee6101f5d50b 100644 (file)
@@ -216,7 +216,15 @@ MOSTLYCLEANFILES += remove-potcdate.sed
 MOSTLYCLEANFILES += stamp-poT
 MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
-MAINTAINERCLEANFILES = stamp-po $(RESOURCESDLLFILES)
+MAINTAINERCLEANFILES = stamp-po
+maintainer-clean-local:
+       if test -n "$(RESOURCESDLLFILES)"; then \
+         for file in $(RESOURCESDLLFILES); do \
+           rm -f "$$file"; \
+           dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$$dir"; then rmdir "$$dir"; fi; \
+         done; \
+       fi
 
 EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(RESOURCESDLLFILES)