1 include $(top_srcdir)/config/common.am
3 DISTCLEANFILES += $(tocfiles)
5 EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(DEPENDFILE) $(docfiles)
11 de_Customization.lyx \
20 eu_Customization.lyx \
28 fr_Customization.lyx \
38 it_Customization.lyx \
68 docdir = $(pkgdatadir)/doc
69 doc_DATA = $(docfiles)
71 DEPENDFILE = $(srcdir)/Makefile.depend
72 # include $(DEPENDFILE) does not work because automake is too limited.
73 include $(srcdir)/Makefile.depend
75 TOCs : $(DEPENDFILE) $(tocfiles)
76 @echo Made TOCs succesfully.
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)
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
88 dist-hook: $(tocfiles)
89 for i in $(tocfiles); \
91 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
92 else file="$$i"; fi; \
93 cp -p "$$file" "$(distdir)"; \
95 install-data-hook: $(tocfiles)
96 for i in $(tocfiles); \
98 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
99 else file="$$i"; fi; \
100 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
104 for i in $(tocfiles); \
106 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \