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 eu_Customization.lyx \
28 fr_Customization.lyx \
39 it_Customization.lyx \
69 docdir = $(pkgdatadir)/doc
70 doc_DATA = $(docfiles)
72 DEPENDFILE = $(srcdir)/Makefile.depend
73 # include $(DEPENDFILE) does not work because automake is too limited.
74 include $(srcdir)/Makefile.depend
76 TOCs : $(DEPENDFILE) $(tocfiles)
77 @echo Made TOCs succesfully.
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)
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
89 dist-hook: $(tocfiles)
90 for i in $(tocfiles); \
92 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
93 else file="$$i"; fi; \
94 cp -p "$$file" "$(distdir)"; \
96 install-data-hook: $(tocfiles)
97 for i in $(tocfiles); \
99 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
100 else file="$$i"; fi; \
101 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
105 for i in $(tocfiles); \
107 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \