1 include $(top_srcdir)/config/common.am
3 DISTCLEANFILES += $(tocfiles)
5 EXTRA_DIST = depend.py doc_toc.py README.Documentation $(DEPENDFILE) $(docfiles)
11 de_Customization.lyx \
20 es_ExtendedInsets.lyx \
21 eu_Customization.lyx \
30 fr_Customization.lyx \
43 it_Customization.lyx \
73 docdir = $(pkgdatadir)/doc
74 doc_DATA = $(docfiles)
76 DEPENDFILE = $(srcdir)/Makefile.depend
77 # include $(DEPENDFILE) does not work because automake is too limited.
78 include $(srcdir)/Makefile.depend
80 TOCs : $(DEPENDFILE) $(tocfiles)
81 @echo Made TOCs succesfully.
83 # Force regeneration of $(DEPENDFILE) when Makefile.am changes because
84 # new doc files might have been added
85 $(DEPENDFILE): $(srcdir)/Makefile.am $(srcdir)/depend.py
86 python $(srcdir)/depend.py > $(DEPENDFILE)
88 # The TOCs are not built for the install and dist targets if they don't exist
89 # for some weird reason.
90 # Make complains although we have rules for them in $(DEPENDFILE), so we
91 # must not include the TOCs in $(docfiles) and have to use the install and
93 dist-hook: $(tocfiles)
94 for i in $(tocfiles); \
96 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
97 else file="$$i"; fi; \
98 cp -p "$$file" "$(distdir)"; \
100 install-data-hook: $(tocfiles)
101 for i in $(tocfiles); \
103 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
104 else file="$$i"; fi; \
105 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
109 for i in $(tocfiles); \
111 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \