]>
Commit | Line | Data |
---|---|---|
4d9b1266 AF |
1 | # |
2 | # No modifications of this Makefile should be necessary. | |
3 | # | |
4 | # To use this template: | |
5 | # 1) Define: figdir, docname, lang, omffile, and entities in | |
6 | # your Makefile.am file for each document directory, | |
7 | # although figdir, omffile, and entities may be empty | |
8 | # 2) Make sure the Makefile in (1) also includes | |
9 | # "include $(top_srcdir)/xmldocs.make" and | |
10 | # "dist-hook: app-dist-hook". | |
11 | # 3) Optionally define 'entities' to hold xml entities which | |
12 | # you would also like installed | |
13 | # 4) Figures must go under $(figdir)/ and be in PNG format | |
14 | # 5) You should only have one document per directory | |
15 | # 6) Note that the figure directory, $(figdir)/, should not have its | |
16 | # own Makefile since this Makefile installs those figures. | |
17 | # | |
18 | # example Makefile.am: | |
19 | # figdir = figures | |
20 | # docname = scrollkeeper-manual | |
21 | # lang = C | |
22 | # omffile=scrollkeeper-manual-C.omf | |
23 | # entities = fdl.xml | |
24 | # include $(top_srcdir)/xmldocs.make | |
25 | # dist-hook: app-dist-hook | |
26 | # | |
27 | # About this file: | |
28 | # This file was taken from scrollkeeper_example2, a package illustrating | |
29 | # how to install documentation and OMF files for use with ScrollKeeper | |
30 | # 0.3.x and 0.4.x. For more information, see: | |
31 | # http://scrollkeeper.sourceforge.net/ | |
32 | # Version: 0.1.2 (last updated: March 20, 2002) | |
33 | # | |
34 | ||
35 | ||
36 | # ************* Begin of section some packagers may need to modify ************** | |
37 | # This variable (docdir) specifies where the documents should be installed. | |
38 | # This default value should work for most packages. | |
39 | # docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang) | |
40 | docdir = $(datadir)/gnome/help/$(docname)/$(lang) | |
41 | ||
42 | # ************** You should not have to edit below this line ******************* | |
43 | xml_files = $(entities) $(docname).xml | |
44 | ||
45 | EXTRA_DIST = $(xml_files) $(omffile) | |
46 | CLEANFILES = omf_timestamp | |
47 | ||
48 | include $(top_srcdir)/omf.make | |
49 | ||
50 | all: omf | |
51 | ||
52 | $(docname).xml: $(entities) | |
53 | -ourdir=`pwd`; \ | |
54 | cd $(srcdir); \ | |
55 | cp $(entities) $$ourdir | |
56 | ||
57 | app-dist-hook: | |
58 | if test "$(figdir)"; then \ | |
59 | $(mkinstalldirs) $(distdir)/$(figdir); \ | |
60 | for file in $(srcdir)/$(figdir)/*.png; do \ | |
61 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ | |
62 | $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ | |
63 | done \ | |
64 | fi | |
65 | ||
66 | install-data-local: omf | |
67 | $(mkinstalldirs) $(DESTDIR)$(docdir) | |
68 | for file in $(xml_files); do \ | |
69 | cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ | |
70 | done | |
71 | if test "$(figdir)"; then \ | |
72 | $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ | |
73 | for file in $(srcdir)/$(figdir)/*.png; do \ | |
74 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ | |
75 | $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ | |
76 | done \ | |
77 | fi | |
78 | ||
79 | install-data-hook: install-data-hook-omf | |
80 | ||
81 | uninstall-local: uninstall-local-doc uninstall-local-omf | |
82 | ||
83 | uninstall-local-doc: | |
84 | -if test "$(figdir)"; then \ | |
85 | for file in $(srcdir)/$(figdir)/*.png; do \ | |
86 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ | |
87 | rm -f $(docdir)/$(figdir)/$$basefile; \ | |
88 | done; \ | |
89 | rmdir $(DESTDIR)$(docdir)/$(figdir); \ | |
90 | fi | |
91 | -for file in $(xml_files); do \ | |
92 | rm -f $(DESTDIR)$(docdir)/$$file; \ | |
93 | done | |
94 | -rmdir $(DESTDIR)$(docdir) | |
95 |