2006-12-05 David Lodge <dave@cirt.net>
[dia.git] / omf.make
blobb990dc07a0380167e23039e1352eb31d2a17a340
1 #
2 # No modifications of this Makefile should be necessary.
4 # This file contains the build instructions for installing OMF files. It is
5 # generally called from the makefiles for particular formats of documentation.
7 # Note that you must configure your package with --localstatedir=/var
8 # so that the scrollkeeper-update command below will update the database
9 # in the standard scrollkeeper directory.
11 # If it is impossible to configure with --localstatedir=/var, then
12 # modify the definition of scrollkeeper_localstate_dir so that
13 # it points to the correct location. Note that you must still use
14 # $(localstatedir) in this or when people build RPMs it will update
15 # the real database on their system instead of the one under RPM_BUILD_ROOT.
17 # Note: This make file is not incorporated into xmldocs.make because, in
18 # general, there will be other documents install besides XML documents
19 # and the makefiles for these formats should also include this file.
21 # About this file:
22 # This file was derived from scrollkeeper_example2, a package
23 # illustrating how to install documentation and OMF files for use with
24 # ScrollKeeper 0.3.x and 0.4.x. For more information, see:
25 # http://scrollkeeper.sourceforge.net/
26 # Version: 0.1.3 (last updated: March 20, 2002)
29 omf_dest_dir=$(datadir)/omf/@PACKAGE@
30 scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
32 # At some point, it may be wise to change to something like this:
33 # scrollkeeper_localstate_dir = @SCROLLKEEPER_STATEDIR@
35 omf: omf_timestamp
37 omf_timestamp: $(omffile)
38 -if test "$(omffile)"; then \
39 for file in $(omffile); do \
40 scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \
41 done; \
42 fi;
43 touch omf_timestamp
45 install-data-hook-omf:
46 $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
47 if test "$(omffile)"; then \
48 for file in $(omffile); do \
49 $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
50 done; \
52 -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
54 uninstall-local-omf:
55 -for file in $(srcdir)/*.omf; do \
56 basefile=`basename $$file`; \
57 rm -f $(omf_dest_dir)/$$basefile; \
58 done
59 -rmdir $(omf_dest_dir)
60 -scrollkeeper-update -p $(scrollkeeper_localstate_dir)
62 clean-local-omf:
63 -if test "$(omffile)"; then \
64 for file in $(omffile); do \
65 rm -f $$file.out; \
66 done; \