--- Makefile.am.orig 2006-12-02 14:23:01.000000000 +0300 +++ Makefile.am 2007-01-27 10:34:19.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,20 @@ @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`; \ + # I suppose IMAGE_DIRS to be updated each time whenever you add new image directory + # and it should not list empty directories + @echo 'Creating base image dirrectories.'; \ + for dir in $(IMAGE_DIRS); do \ + $(mkinstalldirs) html/images/$$dir; \ + done + + @for lang in $(ALL_LINGUAS); do \ + echo 'Creating image dirrectories for language: '$$lang; \ + for file in `find images/ -name "*.png" -o -name "*.jpg" | grep "/$$lang/"`; do \ + $(mkinstalldirs) `dirname html/$$file`; \ + done; \ 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 +146,20 @@ @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; \ + @echo 'Copying common images.'; \ + for dir in $(IMAGE_DIRS); do \ + for file in `echo $(top_srcdir)/images/$$dir/*.png` `echo $(top_srcdir)/images/$$dir/*.jpg`; do \ + if test -f $$file ; then \ + cp $$file html/$$file || exit $$?; \ + fi; \ + done; \ + done; + + @for lang in $(ALL_LINGUAS); do \ + echo 'Copying images for '$$lang ; \ + for file in `find images/ -name "*.png" -o -name "*.jpg" | grep "/$$lang/"`; do \ + cp $$file html/$$file || exit $$?; \ + done; \ done; @touch $@