]> git.lyx.org Git - lyx.git/blob - lib/doc/Makefile.am
* src/support/package.C.in (get_build_dirs): Look at Makefile
[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 LyXConfig.lyx.in 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         Intro.lyx \
38         it_Customization.lyx \
39         it_Intro.lyx \
40         it_Tutorial.lyx \
41         it_UserGuide.lyx \
42         LaTeXConfig.lyx.in \
43         nl_Intro.lyx \
44         nl_Tutorial.lyx \
45         nb_Intro.lyx \
46         pl_Extended.lyx \
47         pl_Intro.lyx \
48         pl_Tutorial.lyx \
49         pt_Intro.lyx \
50         pt_Tutorial.lyx \
51         Reference.lyx \
52         ro_Intro.lyx \
53         ru_FAQ.lyx \
54         ru_Intro.lyx \
55         ru_Tutorial.lyx \
56         sk_Tutorial.lyx \
57         sk_UserGuide.lyx \
58         sl_Intro.lyx \
59         sl_Tutorial.lyx \
60         sv_Intro.lyx \
61         sv_Tutorial.lyx \
62         Tutorial.lyx \
63         UserGuide.lyx \
64         escher-lsd.eps \
65         mobius.eps \
66         platypus.eps
67
68 docdir = $(pkgdatadir)/doc
69 doc_DATA = $(docfiles) 
70
71 DEPENDFILE = $(srcdir)/Makefile.depend
72 # include $(DEPENDFILE) does not work because automake is too limited.
73 include $(srcdir)/Makefile.depend
74
75 TOCs : $(DEPENDFILE) $(tocfiles)
76         @echo Made TOCs succesfully.
77
78 # Force regeneration of $(DEPENDFILE) when Makefile.am changes because
79 # new doc files might have been added
80 $(DEPENDFILE): $(srcdir)/Makefile.am $(srcdir)/depend.py
81         python $(srcdir)/depend.py > $(DEPENDFILE)
82
83 # The TOCs are not built for the install and dist targets if they don't exist
84 # for some weird reason.
85 # Make complains although we have rules for them in $(DEPENDFILE), so we
86 # must not include the TOCs in $(docfiles) and have to use the install and
87 # dist hooks below.
88 dist-hook: $(tocfiles)
89         for i in $(tocfiles); \
90         do \
91                 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
92                 else file="$$i"; fi; \
93                 cp -p "$$file" "$(distdir)"; \
94         done
95 install-data-hook: $(tocfiles)
96         for i in $(tocfiles); \
97         do \
98                 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
99                 else file="$$i"; fi; \
100                 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
101         done
102
103 uninstall-local:
104         for i in $(tocfiles); \
105         do \
106                 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \
107         done
108
109 .PHONY: TOCs