Diff of /help/Makefile.am [000000] .. [24dce1] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/help/Makefile.am
@@ -0,0 +1,205 @@
+## Process this file with automake to produce Makefile.in
+CSS_FILES = \
+	stylesheets/gimp-help-plain.css \
+	stylesheets/gimp-help-screen.css	
+
+XSL_FILES = \
+	stylesheets/plainprint.xsl.in \
+	stylesheets/profile.xsl.in
+
+XML_FILES = \
+	xml/panotools.xml
+
+MAKEINDEX = \
+	stylesheets/makeindex.xsl
+
+HELP_STAMPS = \
+	clean.stamp \
+	css.stamp   \
+	html.stamp  \
+	images.stamp    \
+	index.stamp \
+	mkdirs.stamp    \
+	profile.stamp
+
+FORMATS = html pdf
+
+EXTRA_DIST = \
+	README					\
+	stylesheets/plainhtml.xsl.in    \
+	$(MAKEINDEX)            \
+	images					\
+	$(XML_FILES)            \
+	$(CSS_FILES)			\
+	$(XSL_FILES)
+
+clean.stamp:
+	@echo '*** Removing the built help files ***'
+	@for format in $(FORMATS); do \
+	  rm -rf $$format; \
+	done;
+	echo '*** Removing temporary files ***'
+	for lang in en $(ALL_LINGUAS); do \
+	  rm -rf $(top_builddir)/help/xml/$$lang.xml; \
+	done;
+	rm -rf `find . -name "*~"`
+	rm -rf `find . -name "*.orig"`
+	rm -rf `find . -name "*.bak"`
+	rm -rf `find . -name "*.rej"`
+	touch clean.stamp
+
+mkdirs.stamp:
+	@echo '*** Creating directories ***'
+	@for format in $(FORMATS); do \
+	  for lang in en $(ALL_LINGUAS); do \
+	      $(mkinstalldirs) $$format/$$lang; \
+	  done; \
+	done && \
+	$(mkinstalldirs) xml && \
+	touch mkdirs.stamp
+
+css.stamp: mkdirs.stamp $(CSS_FILES)
+	@echo '*** Copying stylesheets ***'
+	@for lang in en $(ALL_LINGUAS); do \
+	  for css in $(CSS_FILES); do \
+		cp $(srcdir)/$$css $(top_builddir)/help/html/$$lang; \
+	  done; \
+	done && \
+	touch css.stamp
+
+images.stamp: mkdirs.stamp
+	@echo '*** Copying images ***'
+	@for format in $(FORMATS); do \
+	  $(mkinstalldirs) $$format/images; \
+	  cp $(srcdir)/images/*.png $$format/images; \
+	  for lang in en $(ALL_LINGUAS); do \
+		if test -d $(srcdir)/images/$$lang; then \
+		  $(mkinstalldirs) $$format/images/$$lang && \
+		  cp $(srcdir)/images/$$lang/*.png $$format/images/$$lang; \
+		fi \
+	  done; \
+	done && \
+	touch images.stamp
+
+convert.stamp: mkdirs.stamp images.stamp
+	@echo '*** Converting Images to 8bit depth ***'
+	cd $(srcdir)/html/images/; \
+	for i in `find ./ -name '*.png' -type f`; do \
+	  echo "Converting" $$i && \
+	  $(CONVERT) $$i $$i; \
+	done && \
+	touch convert.stamp
+
+profile.stamp: mkdirs.stamp $(XML_FILES)
+	@echo '*** Profiling XML files ***'
+	for lang in en $(ALL_LINGUAS); do \
+	  echo '-- Profiling XML for '$$lang && \
+	  $(XSLTPROC) $(XSLTFLAGS) --xinclude \
+		--stringparam profile.lang $$lang \
+		$(srcdir)/stylesheets/profile.xsl \
+		$(srcdir)/xml/panotools.xml | \
+	  sed -e "s/xmlns[:a-z]*\=\"[^\"]*\" //" | \
+	  sed -e "s/lang=[\"'][A-Za-z_;]*[\"']/lang=\"$$lang\"/" \
+	  > $(top_builddir)/help/xml/$$lang.xml; \
+	done && \
+	touch profile.stamp
+
+html.stamp: profile.stamp $(XML_FILES)
+	@echo '*** Building HTML ***'
+	@for lang in en $(ALL_LINGUAS); do \
+	  echo '-- Building HTML for '$$lang && \
+	  $(XSLTPROC) -o $(top_builddir)/help/html/$$lang/ $(XSLTFLAGS) \
+		  --stringparam l10n.gentext.default.language $$lang \
+	  	  --stringparam profile.lang $$lang \
+	      $(top_builddir)/help/stylesheets/plainhtml.xsl $(top_builddir)/help/xml/$$lang.xml; \
+	done && \
+	touch html.stamp
+
+index.stamp: html.stamp
+	@echo '*** Generating index files ***';
+	@for lang in en $(ALL_LINGUAS); do \
+	  echo '-- Generating index for '$$lang && \
+	  $(XSLTPROC) $(XSLTFLAGS) \
+		$(srcdir)/$(MAKEINDEX) \
+	    $(top_builddir)/help/html/$$lang/gimp-xrefs.xml \
+		> $(top_builddir)/help/html/$$lang/gimp-help.xml ; \
+		sed -i -e 's/<gimp-help>/<gimp-help xmlns:panoplugin="http:\/\/panotools.sourceforge.net\/panoplugin\/help">/g' \
+			   -e 's/help-item id=/help-item panoplugin:id=/g' \
+			   $(top_builddir)/help/html/$$lang/gimp-help.xml; \
+	done && \
+	touch index.stamp
+
+
+if GIMP_HELP_BUILD
+
+dist-check-build:
+
+all-local: clean.stamp css.stamp images.stamp index.stamp
+
+CLEANFILES = $(HELP_STAMPS)
+
+install-data-local:
+	$(mkinstalldirs) $(DATADIR)/help
+	@for lang in en $(ALL_LINGUAS); do \
+	  echo '-- Installing HTML for '$$lang && \
+	  $(mkinstalldirs) $(DATADIR)/help/$$lang; \
+	  cp -r $(top_builddir)/help/html/$$lang/*.html $(DATADIR)/help/$$lang; \
+	  cp -r $(top_builddir)/help/html/$$lang/*.css $(DATADIR)/help/$$lang; \
+	  cp -r $(top_builddir)/help/html/$$lang/gimp-help.xml $(DATADIR)/help/$$lang; \
+	done;
+
+else
+
+dist-check-build:
+	@echo "*** --enable-build must be specified in order to make dist"
+	@false
+
+all-local: css.stamp images.stamp
+
+install-data-local:
+	$(mkinstalldirs) $(DATADIR)/help
+	@for lang in en $(ALL_LINGUAS); do \
+	  echo '-- Installing HTML for '$$lang && \
+	  $(mkinstalldirs) $(DATADIR)/help/$$lang; \
+	  cp -r $(srcdir)/html/$$lang/*.html $(DATADIR)/help/$$lang; \
+	  cp -r $(srcdir)/html/$$lang/*.css $(DATADIR)/help/$$lang; \
+	  cp -r $(srcdir)/html/$$lang/gimp-help.xml $(DATADIR)/help/$$lang; \
+	done;
+
+endif
+
+MAINTAINERCLEANFILES =	\
+	$(HELP_STAMPS)		\
+	Makefile.in
+
+CONFIG_CLEAN_FILES = $(HELP_STAMPS)
+
+maintainer-clean-local:
+	rm -rf html pdf
+
+distclean-local:
+	for lang in en $(ALL_LINGUAS); do \
+	  rm -f html/$$lang/*.css; \
+	done;
+	rm -rf html/images
+	rm -rf pdf/images
+
+clean-local:
+	for lang in en $(ALL_LINGUAS); do \
+	  rm -f xml/$$lang.xml; \
+	done;
+
+## Do not copy the complete html directory to distdir.
+## The images don't need to be in the tarball twice, they are copied
+## by the images.stamp rule.
+dist-hook:
+	$(mkinstalldirs) $(distdir)/html
+	for lang in en $(ALL_LINGUAS); do \
+	  cp -r html/$$lang $(distdir)/html; \
+	done
+	rm -rf `find $(distdir)/images -name CVS`
+	rm -rf `find $(distdir)/images -name .cvsignore`
+
+## Cleanup properly
+uninstall-hook:
+	rm -rf $(DATADIR)