Image files does not honour ALL_LINGUAS during installation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Currently gimp-doc does not use ALL_LINGUAS during images installation
and thus installs all images even if ALL_LINGUAS was set only to en.
This increases building time if configured with --enable-convert as more
pictures requires Converting and also this increase disk usage of
installed documentation. Suggested fix for the problem in attachment
(patch against Makefile.am). Can anybody review and if this is correct
fix apply it in your cvs?

If this mailing list is wrong place to report bugs, I'm sorry in
advance... I have not found better place. Please, point me to the right
one.

In any way thank you for your time,
Peter.
--- Makefile.am.orig	2006-12-02 14:23:01.000000000 +0300
+++ Makefile.am	2007-01-21 17:43:13.000000000 +0300
@@ -3,17 +3,19 @@
 STAMP_DIR = stamps
 
 IMAGE_DIRS = \
+	.		\
+	callouts	\
 	dialogs		\
 	dialogs/examples\
 	filters		\
 	filters/examples\
 	glossary	\
+	math		\
+	menus		\
+	preferences	\
 	tool-options	\
 	toolbox		\
-	callouts	\
-	preferences	\
-	using           \
-	menus
+	using
 
 IMAGE_FILES = \
 	$(wildcard $(top_srcdir)/images/*.png)		\
@@ -93,9 +95,21 @@
 	@echo '*** Creating directories ***'
 
     # we care only for HTML here
-	@for name in `find $(top_srcdir)/images/ -name "*.png" -o -name "*.jpg"`;\
-		do $(mkinstalldirs) `dirname html/$$name`; \
+	@for lang in $(ALL_LINGUAS); do \
+	  echo 'Language: '$$lang; \
+	  if test $$lang = "en"; then \
+	    for dir in $(IMAGE_DIRS); do \
+	      for file in `echo $(top_srcdir)/images/$$dir/*.png` `echo $(top_srcdir)/images/$$dir/*.jpg`; do \
+		$(mkinstalldirs) `dirname html/$$file`; \
+	      done; \
+	    done; \
+	  else \
+	    for file in `find images/ -wholename "*/$$lang/*.png" -o -wholename "*/$$lang/*.jpg"`; do \
+	      $(mkinstalldirs) `dirname html/$$file`; \
+	    done; \
+	  fi; \
 	done;
+
   # only create a link in the PDF directory, because image files are
   # included in the PDF anyways
 	@echo '*** Creating link in PDF directory to images ***'
@@ -133,8 +147,19 @@
 	@echo '*** Copying images ***'
 
   # copy the image files to html directory
-	@for name in `find $(top_srcdir)/images/ -name "*.png" -o -name "*.jpg"`;\
-    do cp $$name html/$$name; \
+	@for lang in $(ALL_LINGUAS); do \
+	  echo 'Language: '$$lang; \
+	  if test $$lang = "en"; then \
+	    for dir in $(IMAGE_DIRS); do \
+	      for file in `echo $(top_srcdir)/images/$$dir/*.png` `echo $(top_srcdir)/images/$$dir/*.jpg`; do \
+		test -f $$file && cp $$file html/$$file; \
+	      done; \
+	    done; \
+	  else \
+	    for file in `find images/ -wholename "*/$$lang/*.png" -o -wholename "*/$$lang/*.jpg"`; do \
+	      cp $$file html/$$file; \
+	    done; \
+	  fi; \
 	done;
 
 	@touch $@

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux