]> git.lyx.org Git - lyx.git/blob - lib/doc/Makefile.am
c9459c97f41df142da1fe3f74c3a7540f2c65af8
[lyx.git] / lib / doc / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 DISTCLEANFILES += $(tocfiles)
4
5 EXTRA_DIST = depend.py doc_toc.py README.Documentation $(DEPENDFILE) $(docfiles)
6
7 docfiles = \
8         cs_Tutorial.lyx \
9         Customization.lyx \
10         da_Intro.lyx \
11         de_Customization.lyx \
12         de_Extended.lyx \
13         de_FAQ.lyx \
14         de_Intro.lyx \
15         de_Tutorial.lyx \
16         de_UserGuide.lyx \
17         DocStyle.lyx \
18         es_Intro.lyx \
19         es_Tutorial.lyx \
20         eu_Customization.lyx \
21         eu_Extended.lyx \
22         eu_FAQ.lyx \
23         eu_Intro.lyx \
24         eu_Tutorial.lyx \
25         eu_UserGuide.lyx \
26         Extended.lyx \
27         FAQ.lyx \
28         fr_Customization.lyx \
29         fr_Extended.lyx \
30         fr_FAQ.lyx \
31         fr_Intro.lyx \
32         fr_Tutorial.lyx \
33         fr_UserGuide.lyx \
34         he_Intro.lyx \
35         he_Tutorial.lyx \
36         hu_Intro.lyx \
37         hu_Tutorial.lyx \
38         Intro.lyx \
39         it_Customization.lyx \
40         it_Intro.lyx \
41         it_Tutorial.lyx \
42         it_UserGuide.lyx \
43         LaTeXConfig.lyx.in \
44         nl_Intro.lyx \
45         nl_Tutorial.lyx \
46         nb_Intro.lyx \
47         pl_Extended.lyx \
48         pl_Intro.lyx \
49         pl_Tutorial.lyx \
50         pt_Intro.lyx \
51         pt_Tutorial.lyx \
52         Reference.lyx \
53         ro_Intro.lyx \
54         ru_FAQ.lyx \
55         ru_Intro.lyx \
56         ru_Tutorial.lyx \
57         sk_Tutorial.lyx \
58         sk_UserGuide.lyx \
59         sl_Intro.lyx \
60         sl_Tutorial.lyx \
61         sv_Intro.lyx \
62         sv_Tutorial.lyx \
63         Tutorial.lyx \
64         UserGuide.lyx \
65         escher-lsd.eps \
66         mobius.eps \
67         platypus.eps
68
69 docdir = $(pkgdatadir)/doc
70 doc_DATA = $(docfiles) 
71
72 DEPENDFILE = $(srcdir)/Makefile.depend
73 # include $(DEPENDFILE) does not work because automake is too limited.
74 include $(srcdir)/Makefile.depend
75
76 TOCs : $(DEPENDFILE) $(tocfiles)
77         @echo Made TOCs succesfully.
78
79 # Force regeneration of $(DEPENDFILE) when Makefile.am changes because
80 # new doc files might have been added
81 $(DEPENDFILE): $(srcdir)/Makefile.am $(srcdir)/depend.py
82         python $(srcdir)/depend.py > $(DEPENDFILE)
83
84 # The TOCs are not built for the install and dist targets if they don't exist
85 # for some weird reason.
86 # Make complains although we have rules for them in $(DEPENDFILE), so we
87 # must not include the TOCs in $(docfiles) and have to use the install and
88 # dist hooks below.
89 dist-hook: $(tocfiles)
90         for i in $(tocfiles); \
91         do \
92                 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
93                 else file="$$i"; fi; \
94                 cp -p "$$file" "$(distdir)"; \
95         done
96 install-data-hook: $(tocfiles)
97         for i in $(tocfiles); \
98         do \
99                 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
100                 else file="$$i"; fi; \
101                 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
102         done
103
104 uninstall-local:
105         for i in $(tocfiles); \
106         do \
107                 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \
108         done
109
110 .PHONY: TOCs