1 | # To use this template: |
---|
2 | # 1) Define: figs, docname, lang, omffile, sgml_ents although figs, |
---|
3 | # omffile, and sgml_ents 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 SGML filename |
---|
10 | # of the document. This is required by GNOME. eg: |
---|
11 | # $prefix/share/gnome/help/fish_applet/C/fish_applet.sgml |
---|
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 SGML file: <docname>.sgml |
---|
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 | # sgml_ents This is a list of SGML entities which must be installed |
---|
22 | # with the main SGML 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 | # sgml_ents = fdl.sgml |
---|
31 | # include $(top_srcdir)/help/sgmldocs.make |
---|
32 | # dist-hook: app-dist-hook |
---|
33 | # |
---|
34 | |
---|
35 | docdir = $(datadir)/gnome/help/$(docname)/$(lang) |
---|
36 | |
---|
37 | doc_DATA = index.html |
---|
38 | |
---|
39 | sgml_files = $(sgml_ents) $(docname).sgml |
---|
40 | |
---|
41 | omf_dir=$(top_srcdir)/omf-install |
---|
42 | |
---|
43 | EXTRA_DIST = $(sgml_files) $(doc_DATA) $(omffile) $(figs) |
---|
44 | |
---|
45 | CLEANFILES = omf_timestamp |
---|
46 | |
---|
47 | all: index.html omf |
---|
48 | |
---|
49 | omf: omf_timestamp |
---|
50 | |
---|
51 | omf_timestamp: $(omffile) |
---|
52 | -for file in $(omffile); do \ |
---|
53 | scrollkeeper-preinstall $(docdir)/$(docname).sgml $$file $(omf_dir)/$$file; \ |
---|
54 | done |
---|
55 | touch omf_timestamp |
---|
56 | |
---|
57 | index.html: $(docname)/index.html |
---|
58 | -cp $(docname)/index.html . |
---|
59 | |
---|
60 | $(docname).sgml: $(sgml_ents) |
---|
61 | -ourdir=`pwd`; \ |
---|
62 | cd $(srcdir); \ |
---|
63 | cp $(sgml_ents) $$ourdir |
---|
64 | |
---|
65 | |
---|
66 | # The weird srcdir trick is because the db2html from the Cygnus RPMs |
---|
67 | # cannot handle relative filenames |
---|
68 | $(docname)/index.html: $(srcdir)/$(docname).sgml |
---|
69 | -srcdir=`cd $(srcdir) && pwd`; \ |
---|
70 | if test "$(HAVE_JW)" = 'yes' ; then \ |
---|
71 | jw -c /etc/sgml/catalog $$srcdir/$(docname).sgml -o $$srcdir/$(docname); \ |
---|
72 | else \ |
---|
73 | db2html $$srcdir/$(docname).sgml; \ |
---|
74 | fi |
---|
75 | |
---|
76 | app-dist-hook: index.html |
---|
77 | -$(mkinstalldirs) $(distdir)/$(docname)/stylesheet-images |
---|
78 | -$(mkinstalldirs) $(distdir)/figures |
---|
79 | -cp $(srcdir)/$(docname)/*.html $(distdir)/$(docname) |
---|
80 | -for file in $(srcdir)/$(docname)/*.css; do \ |
---|
81 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
82 | cp $$file $(distdir)/$(docname)/$$basefile ; \ |
---|
83 | done |
---|
84 | -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \ |
---|
85 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
86 | cp $$file $(distdir)/$(docname)/stylesheet-images/$$basefile ; \ |
---|
87 | done |
---|
88 | -if [ -e topic.dat ]; then \ |
---|
89 | cp $(srcdir)/topic.dat $(distdir); \ |
---|
90 | fi |
---|
91 | |
---|
92 | install-data-am: index.html omf |
---|
93 | -$(mkinstalldirs) $(DESTDIR)$(docdir)/stylesheet-images |
---|
94 | -$(mkinstalldirs) $(DESTDIR)$(docdir)/figures |
---|
95 | -cp $(srcdir)/$(sgml_files) $(DESTDIR)$(docdir) |
---|
96 | -for file in $(srcdir)/$(docname)/*.html $(srcdir)/$(docname)/*.css; do \ |
---|
97 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
98 | $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$basefile; \ |
---|
99 | done |
---|
100 | -for file in $(srcdir)/figures/*.png; do \ |
---|
101 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
102 | $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/figures/$$basefile; \ |
---|
103 | done |
---|
104 | -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \ |
---|
105 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
106 | $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/stylesheet-images/$$basefile; \ |
---|
107 | done |
---|
108 | -if [ -e $(srcdir)/topic.dat ]; then \ |
---|
109 | $(INSTALL_DATA) $(srcdir)/topic.dat $(DESTDIR)$(docdir); \ |
---|
110 | fi |
---|
111 | |
---|
112 | $(docname).ps: $(srcdir)/$(docname).sgml |
---|
113 | -srcdir=`cd $(srcdir) && pwd`; \ |
---|
114 | db2ps $$srcdir/$(docname).sgml |
---|
115 | |
---|
116 | $(docname).rtf: $(srcdir)/$(docname).sgml |
---|
117 | -srcdir=`cd $(srcdir) && pwd`; \ |
---|
118 | db2ps $$srcdir/$(docname).sgml |
---|
119 | |
---|
120 | uninstall-local: |
---|
121 | -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \ |
---|
122 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
123 | rm -f $(docdir)/stylesheet-images/$$basefile; \ |
---|
124 | done |
---|
125 | -for file in $(srcdir)/figures/*.png; do \ |
---|
126 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
127 | rm -f $(docdir)/figures/$$basefile; \ |
---|
128 | done |
---|
129 | -for file in $(srcdir)/$(docname)/*.html $(srcdir)/$(docname)/*.css; do \ |
---|
130 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ |
---|
131 | rm -f $(DESTDIR)$(docdir)/$$basefile; \ |
---|
132 | done |
---|
133 | -for file in $(sgml_files); do \ |
---|
134 | rm -f $(DESTDIR)$(docdir)/$$file; \ |
---|
135 | done |
---|
136 | -rmdir $(DESTDIR)$(docdir)/stylesheet-images |
---|
137 | -rmdir $(DESTDIR)$(docdir)/figures |
---|
138 | -rmdir $(DESTDIR)$(docdir) |
---|