diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-02-20 12:59:22 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-02-20 12:59:22 -0500 |
commit | e555a6e78398998a089d734ed3a4bd6535d1240e (patch) | |
tree | 921502ebf7866f0228726b65d0f4624af4113a84 | |
parent | 4e4e036a0e56ff62993267be156b48ad0889bd58 (diff) | |
download | yelp-tools-e555a6e78398998a089d734ed3a4bd6535d1240e.tar.gz |
yelp.m4: Fix install/uninstall targets with lots of files
-rw-r--r-- | tools/yelp.m4 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/yelp.m4 b/tools/yelp.m4 index 370726b..34b162a 100644 --- a/tools/yelp.m4 +++ b/tools/yelp.m4 @@ -133,7 +133,14 @@ install-help: @for lc in C $(_HELP_LINGUAS); do \ $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \ done - @for f in $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_C_EXTRA); do \ + @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \ + if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \ + helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \ + if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \ + echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \ + $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \ + done; done + @for f in $(_HELP_C_EXTRA); do \ lc=`dirname "$$f"`; lc=`basename "$$lc"`; \ if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \ helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \ @@ -161,7 +168,12 @@ install-help: .PHONY: uninstall-help uninstall-am: $(if $(HELP_ID),uninstall-help) uninstall-help: - @for f in $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_C_EXTRA); do \ + for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \ + helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \ + echo "rm -f $$helpdir`basename $$f`"; \ + rm -f "$$helpdir`basename $$f`"; \ + done; done + @for f in $(_HELP_C_EXTRA); do \ lc=`dirname "$$f"`; lc=`basename "$$lc"`; \ helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \ echo "rm -f $$helpdir`basename $$f`"; \ |