diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-10-21 22:53:27 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-10-21 22:53:27 +0000 |
commit | 1708339cce2527ee4678a215087627b9e1ea022f (patch) | |
tree | a47a1f8bc2b75765c831463413af2782769a62f9 /tools | |
parent | 401ad193a084e1bb711ecfc4d50cc9a9b7ec245c (diff) | |
download | gnome-doc-utils-1708339cce2527ee4678a215087627b9e1ea022f.tar.gz |
Save disk space by Symlinking the non-localised figures to the C figures
* tools/gnome-doc-utils.make: Save disk space by Symlinking the
non-localised figures to the C figures instead of copying them. Bug
#557227.
* tools/gnome-doc-utils.m4: Require AC_PROG_LN_S.
* configure.ac: Call AC_PROG_LN_S explicitly since g-d-u doesn't use
GNOME_DOC_INIT itself.
svn path=/trunk/; revision=1126
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gnome-doc-utils.m4 | 3 | ||||
-rw-r--r-- | tools/gnome-doc-utils.make | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tools/gnome-doc-utils.m4 b/tools/gnome-doc-utils.m4 index 04f79bb..4aef712 100644 --- a/tools/gnome-doc-utils.m4 +++ b/tools/gnome-doc-utils.m4 @@ -36,7 +36,8 @@ AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"]) # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) # AC_DEFUN([GNOME_DOC_INIT], -[ +[AC_REQUIRE([AC_PROG_LN_S])dnl + ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1]) PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required], diff --git a/tools/gnome-doc-utils.make b/tools/gnome-doc-utils.make index 147ab77..b7ea210 100644 --- a/tools/gnome-doc-utils.make +++ b/tools/gnome-doc-utils.make @@ -504,14 +504,13 @@ install-doc-docs: install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ + figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ - elif test -f "C/$$fig"; then \ - figfile="C/$$fig"; \ else \ - figfile="$(srcdir)/C/$$fig"; \ + figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \ @@ -520,8 +519,13 @@ install-doc-figs: $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ - echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ - $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + if $$figsymlink; then \ + echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ + ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ + else \ + echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ + $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ + fi; \ done; \ done |