[18702] | 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 |
---|
| 7 | # |
---|
| 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 | # ^^^^^^^^^^^ ^^^^^^^^^^^ |
---|
| 13 | # Definitions: |
---|
| 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. |
---|
| 23 | # eg: |
---|
| 24 | # figs = \ |
---|
| 25 | # figures/fig1.png \ |
---|
| 26 | # figures/fig2.png |
---|
| 27 | # docname = scrollkeeper-manual |
---|
| 28 | # lang = C |
---|
| 29 | # omffile=scrollkeeper-manual-C.omf |
---|
| 30 | # entities = fdl.xml |
---|
| 31 | # include $(top_srcdir)/help/xmldocs.make |
---|
| 32 | # dist-hook: app-dist-hook |
---|
| 33 | # |
---|
| 34 | |
---|
| 35 | docdir = $(datadir)/gnome/help/$(docname)/$(lang) |
---|
| 36 | |
---|
| 37 | xml_files = $(entities) $(docname).xml |
---|
| 38 | |
---|
| 39 | omf_dir=$(top_srcdir)/omf-install |
---|
| 40 | |
---|
| 41 | EXTRA_DIST = $(xml_files) $(omffile) $(figs) |
---|
| 42 | |
---|
| 43 | CLEANFILES = omf_timestamp |
---|
| 44 | |
---|
| 45 | all: omf |
---|
| 46 | |
---|
| 47 | omf: omf_timestamp |
---|
| 48 | |
---|
| 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}; \ |
---|
| 52 | done |
---|
| 53 | touch omf_timestamp |
---|
| 54 | |
---|
| 55 | $(docname).xml: $(entities) |
---|
| 56 | -ourdir=`pwd`; \ |
---|
| 57 | cd $(srcdir); \ |
---|
| 58 | cp $(entities) $$ourdir |
---|
| 59 | |
---|
| 60 | app-dist-hook: |
---|
| 61 | -$(mkinstalldirs) $(distdir)/figures |
---|
| 62 | -if [ -e topic.dat ]; then \ |
---|
| 63 | cp $(srcdir)/topic.dat $(distdir); \ |
---|
| 64 | fi |
---|
| 65 | |
---|
| 66 | install-data-am: omf |
---|
| 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; \ |
---|
| 72 | done |
---|
| 73 | -if [ -e $(srcdir)/topic.dat ]; then \ |
---|
| 74 | $(INSTALL_DATA) $(srcdir)/topic.dat $(DESTDIR)$(docdir); \ |
---|
| 75 | fi |
---|
| 76 | |
---|
| 77 | uninstall-local: |
---|
| 78 | -for file in $(srcdir)/figures/*.png; do \ |
---|
| 79 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
| 80 | rm -f $(docdir)/figures/$$basefile; \ |
---|
| 81 | done |
---|
| 82 | -for file in $(xml_files); do \ |
---|
| 83 | rm -f $(DESTDIR)$(docdir)/$$file; \ |
---|
| 84 | done |
---|
| 85 | -rmdir $(DESTDIR)$(docdir)/figures |
---|
| 86 | -rmdir $(DESTDIR)$(docdir) |
---|