medit/doc/Makefile.am

151 lines
6.1 KiB
Makefile
Raw Normal View History

2010-12-25 15:16:51 -08:00
BUILT_SOURCES =
2010-08-30 22:19:58 -07:00
if MOO_DEV_MODE
2010-12-28 02:28:24 -08:00
$(srcdir)/built/medit-defines.ent: medit-defines.ent.in $(top_builddir)/config.status
2010-12-26 20:18:16 -08:00
$(AM_V_GEN)cd $(top_builddir) && ./config.status --silent --file=doc/medit-defines.ent
2010-12-28 02:28:24 -08:00
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
$(AM_V_at)mv medit-defines.ent $(srcdir)/built/
2010-09-04 04:25:07 -07:00
2010-12-25 15:16:51 -08:00
gendocbook_files = \
$(top_srcdir)/api/gendocbook.py \
2010-12-23 16:24:52 -08:00
$(top_srcdir)/api/mpi/__init__.py \
$(top_srcdir)/api/mpi/module.py \
2010-12-25 15:16:51 -08:00
$(top_srcdir)/api/mpi/docbookwriter.py
2011-01-22 17:40:22 -08:00
script_docbook_sources = \
built/script-python.docbook \
built/script-lua.docbook \
built/script-lua-gtk.docbook
2010-12-28 02:28:24 -08:00
$(srcdir)/built/script-python.docbook: $(gendocbook_files) script-python.tmpl.docbook $(top_srcdir)/api/moo.xml
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-12-28 02:17:20 -08:00
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
--python --template $(srcdir)/script-python.tmpl.docbook \
$(top_srcdir)/api/moo.xml > script-python.docbook.tmp && \
2010-12-28 02:28:24 -08:00
mv script-python.docbook.tmp $(srcdir)/built/script-python.docbook
2010-12-28 02:17:20 -08:00
2011-01-22 17:40:22 -08:00
$(srcdir)/built/script-lua.docbook: $(gendocbook_files) script-lua.tmpl.docbook $(top_srcdir)/api/moo.xml $(top_srcdir)/api/gtk.xml
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-12-28 02:17:20 -08:00
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
--lua --template $(srcdir)/script-lua.tmpl.docbook \
2011-01-22 17:40:22 -08:00
--import $(top_srcdir)/api/gtk.xml \
2010-12-28 02:17:20 -08:00
$(top_srcdir)/api/moo.xml > script-lua.docbook.tmp && \
2010-12-28 02:28:24 -08:00
mv script-lua.docbook.tmp $(srcdir)/built/script-lua.docbook
2010-12-28 02:17:20 -08:00
2010-12-28 02:28:24 -08:00
$(srcdir)/built/script-lua-gtk.docbook: $(gendocbook_files) script-lua-gtk.tmpl.docbook $(top_srcdir)/api/gtk.xml
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-12-28 02:17:20 -08:00
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
--lua --template $(srcdir)/script-lua-gtk.tmpl.docbook \
$(top_srcdir)/api/gtk.xml > script-lua-gtk.docbook.tmp && \
2010-12-28 02:28:24 -08:00
mv script-lua-gtk.docbook.tmp $(srcdir)/built/script-lua-gtk.docbook
2010-12-25 15:16:51 -08:00
2011-01-22 17:40:22 -08:00
# $(srcdir)/help/script-python.html: built/script-python.docbook built/medit-defines.ent script.xsl
# $(AM_V_at)$(MKDIR_P) $(srcdir)/help/
# $(AM_V_GEN)xsltproc --output script-python.html.tmp \
# $(srcdir)/script.xsl $(srcdir)/built/script-python.docbook \
# && mv script-python.html.tmp $(srcdir)/help/script-python.html
#
# $(srcdir)/help/script-lua.html: built/script-lua.docbook built/medit-defines.ent script.xsl
# $(AM_V_at)$(MKDIR_P) $(srcdir)/help/
# $(AM_V_GEN)xsltproc --output script-lua.html.tmp \
# $(srcdir)/script.xsl $(srcdir)/built/script-lua.docbook \
# && mv script-lua.html.tmp $(srcdir)/help/script-lua.html
#
# $(srcdir)/help/script-lua-gtk.html: built/script-lua-gtk.docbook built/medit-defines.ent script.xsl
# $(AM_V_at)$(MKDIR_P) $(srcdir)/help/
# $(AM_V_GEN)xsltproc --output script-lua-gtk.html.tmp \
# $(srcdir)/script.xsl $(srcdir)/built/script-lua-gtk.docbook \
# && mv script-lua-gtk.html.tmp $(srcdir)/help/script-lua-gtk.html
$(srcdir)/help/script/index.html: $(script_docbook_sources) script-book.xsl
$(AM_V_GEN)cd $(srcdir) && xsltproc --xinclude script-book.xsl script.docbook
2010-12-23 16:24:52 -08:00
2010-12-26 20:18:16 -08:00
$(srcdir)/help/medit.css: medit.css
$(AM_V_at)$(MKDIR_P) $(srcdir)/help/
$(AM_V_GEN)cp $(srcdir)/medit.css $(srcdir)/help/
2010-12-28 02:28:24 -08:00
$(srcdir)/built/lgpl.no-fancy-chars: $(top_srcdir)/COPYING
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-12-26 20:18:16 -08:00
tr -d '\014' < $(top_srcdir)/COPYING > lgpl.no-fancy-chars.tmp && \
2010-12-28 02:28:24 -08:00
mv lgpl.no-fancy-chars.tmp $(srcdir)/built/lgpl.no-fancy-chars
2010-12-26 20:18:16 -08:00
docbook_files = \
medit.docbook \
prefs.docbook \
regex.docbook \
user-tools.docbook \
license.docbook
docbook_sources = \
$(docbook_files) \
2010-12-28 02:28:24 -08:00
built/lgpl.no-fancy-chars \
built/medit-defines.ent
2010-12-26 20:18:16 -08:00
$(srcdir)/help/index.html: $(docbook_sources) medit.xsl medit-common.xsl
$(AM_V_GEN)cd $(srcdir) && xsltproc --xinclude medit.xsl medit.docbook
$(srcdir)/help/help.html: $(docbook_sources) medit-single.xsl medit-common.xsl
$(AM_V_at)$(MKDIR_P) $(srcdir)/help/
$(AM_V_GEN)xsltproc --xinclude --output help.html.tmp $(srcdir)/medit-single.xsl $(srcdir)/medit.docbook && \
mv help.html.tmp $(srcdir)/help/help.html
toc.xml: $(docbook_sources)
$(AM_V_GEN)xsltproc --output toc.xml --xinclude \
--stringparam chunk.first.sections 1 \
http://docbook.sourceforge.net/release/xsl/current/html/maketoc.xsl $(srcdir)/medit.docbook
moo-help-sections.h.stamp: $(docbook_files) toc.xml genhelpsectionsh.py
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-12-26 20:18:16 -08:00
$(AM_V_GEN)$(PYTHON) $(srcdir)/genhelpsectionsh.py --toc=toc.xml --srcdir=$(srcdir) $(docbook_files) > moo-help-sections.h.tmp
2010-12-28 02:28:24 -08:00
$(AM_V_at)cmp -s moo-help-sections.h.tmp $(srcdir)/built/moo-help-sections.h || \
mv moo-help-sections.h.tmp $(srcdir)/built/moo-help-sections.h
2010-12-26 20:18:16 -08:00
$(AM_V_at)rm -f moo-help-sections.h.tmp
$(AM_V_at)echo stamp > moo-help-sections.h.stamp
2010-09-01 02:17:08 -07:00
2010-12-27 00:30:33 -08:00
png_files = prefs-file-filters.png prefs-file-selector.png
dest_png_files = $(addprefix $(srcdir)/help/img/,$(png_files))
$(srcdir)/help/img/%.png: img/%.png
$(AM_V_at)$(MKDIR_P) $(srcdir)/help/img/
$(AM_V_GEN)cp $(srcdir)/img/$*.png $(srcdir)/help/img/
2010-08-30 22:19:58 -07:00
all-am: doc
2010-12-26 20:18:16 -08:00
doc: \
$(srcdir)/help/index.html \
$(srcdir)/help/help.html \
2011-01-22 17:40:22 -08:00
$(srcdir)/help/script/index.html \
2010-12-26 20:18:16 -08:00
$(srcdir)/help/medit.css \
2010-12-28 02:28:24 -08:00
$(srcdir)/built/medit.1 \
2010-12-27 00:30:33 -08:00
$(dest_png_files) \
2010-12-26 20:18:16 -08:00
moo-help-sections.h.stamp
2010-09-06 14:57:13 -07:00
2010-12-28 02:28:24 -08:00
$(srcdir)/built/man-medit.t2t: man-medit.t2t.in $(top_builddir)/config.status
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
2010-10-01 00:51:33 -07:00
$(AM_V_GEN)cd $(top_builddir) && ./config.status --silent --file=doc/man-medit.t2t
2010-12-28 02:28:24 -08:00
$(AM_V_at)mv man-medit.t2t $(srcdir)/built/man-medit.t2t
2010-09-06 14:57:13 -07:00
2010-12-28 02:28:24 -08:00
$(srcdir)/built/medit.1: built/man-medit.t2t
$(AM_V_GEN)txt2tags --target=man --outfile=- $(srcdir)/built/man-medit.t2t | grep -v "cmdline: txt2tags" \
> medit.1.tmp && mv medit.1.tmp $(srcdir)/built/medit.1
2010-08-30 22:19:58 -07:00
endif
2010-12-28 02:28:24 -08:00
EXTRA_DIST = help built/moo-help-sections.h built/medit.1
2010-08-31 00:19:05 -07:00
2010-08-30 22:19:58 -07:00
install-data-local:
2011-01-22 22:12:20 -08:00
$(MKDIR_P) $(DESTDIR)$(MOO_HELP_DIR)/img $(DESTDIR)$(MOO_HELP_DIR)/script
2010-12-27 00:30:33 -08:00
cd $(srcdir) && $(INSTALL_DATA) help/*.html help/*.css $(DESTDIR)$(MOO_HELP_DIR)
2011-01-22 22:12:20 -08:00
cd $(srcdir) && $(INSTALL_DATA) help/script/*.html $(DESTDIR)$(MOO_HELP_DIR)/script
2010-12-27 00:30:33 -08:00
cd $(srcdir) && $(INSTALL_DATA) help/img/*.png $(DESTDIR)$(MOO_HELP_DIR)/img
2010-08-30 22:19:58 -07:00
uninstall-local:
2011-01-22 22:12:20 -08:00
rm -f $(DESTDIR)$(MOO_HELP_DIR)/*.html \
$(DESTDIR)$(MOO_HELP_DIR)/*.css \
$(DESTDIR)$(MOO_HELP_DIR)/script/*.html \
$(DESTDIR)$(MOO_HELP_DIR)/img/*.png
2010-08-30 22:19:58 -07:00
2010-09-06 14:57:13 -07:00
if MOO_OS_UNIX
2010-12-28 02:28:24 -08:00
dist_man_MANS = built/medit.1
2010-09-06 14:57:13 -07:00
endif MOO_OS_UNIX