1 # To use this template:
2 # 1) Define: figs, docname, lang, omffile, entities although figs,
3 # omffile, and entities may be empty in your Makefile.am which
4 # will "include" this one
5 # 2) Figures must go under figures/ and be in PNG format
6 # 3) You should only have one document per directory
8 # Note that this makefile forces the directory name under
9 # $prefix/share/gnome/help/ to be the same as the XML filename
10 # of the document. This is required by GNOME. eg:
11 # $prefix/share/gnome/help/fish_applet/C/fish_applet.xml
12 # ^^^^^^^^^^^ ^^^^^^^^^^^
14 # figs A list of screenshots which will be included in EXTRA_DIST
15 # Note that these should reside in figures/ and should be .png
16 # files, or you will have to make modifications below.
17 # docname This is the name of the XML file: <docname>.xml
18 # lang This is the document locale
19 # omffile This is the name of the OMF file. Convention is to name
20 # it <docname>-<locale>.omf.
21 # entities This is a list of XML entities which must be installed
22 # with the main XML file and included in EXTRA_DIST.
27 # docname = scrollkeeper-manual
29 # omffile=scrollkeeper-manual-C.omf
31 # include $(top_srcdir)/help/xmldocs.make
32 # dist-hook: app-dist-hook
35 docdir
= $(datadir)/gnome
/help
/$(docname
)/$(lang
)
37 xml_files
= $(entities
) $(docname
).xml
39 omf_dir
=$(top_srcdir
)/omf-install
41 EXTRA_DIST
= $(xml_files
) $(omffile
) $(figs
)
43 CLEANFILES
= omf_timestamp
49 omf_timestamp
: $(omffile
)
50 -for file in
$(omffile
); do \
51 scrollkeeper-preinstall
$(docdir
)/`awk 'BEGIN {RS = ">" } /identifier/ {print $$0}' $${file} | awk 'BEGIN {FS="\""} /url/ {print $$2}'` $${file} $(omf_dir
)/$${file}; \
55 $(docname
).xml
: $(entities
)
58 cp
$(entities
) $$ourdir
61 -$(mkinstalldirs
) $(distdir
)/figures
62 -if
[ -e topic.dat
]; then \
63 cp
$(srcdir)/topic.dat
$(distdir
); \
67 -$(mkinstalldirs
) $(DESTDIR
)$(docdir
)/figures
68 -cp
$(srcdir)/$(xml_files
) $(DESTDIR
)$(docdir
)
69 -for file in
$(srcdir)/figures
/*.png
; do \
70 basefile
=`echo $$file | sed -e 's,^.*/,,'`; \
71 $(INSTALL_DATA
) $$file $(DESTDIR
)$(docdir
)/figures
/$$basefile; \
73 -if
[ -e
$(srcdir)/topic.dat
]; then \
74 $(INSTALL_DATA
) $(srcdir)/topic.dat
$(DESTDIR
)$(docdir
); \
78 -for file in
$(srcdir)/figures
/*.png
; do \
79 basefile
=`echo $$file | sed -e 's,^.*/,,'`; \
80 rm -f
$(docdir
)/figures
/$$basefile; \
82 -for file in
$(xml_files
); do \
83 rm -f
$(DESTDIR
)$(docdir
)/$$file; \
85 -rmdir
$(DESTDIR
)$(docdir
)/figures
86 -rmdir
$(DESTDIR
)$(docdir
)