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 \
41 it_Customization.lyx \
71 docdir = $(pkgdatadir)/doc
72 doc_DATA = $(docfiles)
74 DEPENDFILE = $(srcdir)/Makefile.depend
75 # include $(DEPENDFILE) does not work because automake is too limited.
76 include $(srcdir)/Makefile.depend
78 TOCs : $(DEPENDFILE) $(tocfiles)
79 @echo Made TOCs succesfully.
81 # Force regeneration of $(DEPENDFILE) when Makefile.am changes because
82 # new doc files might have been added
83 $(DEPENDFILE): $(srcdir)/Makefile.am $(srcdir)/depend.py
84 python $(srcdir)/depend.py > $(DEPENDFILE)
86 # The TOCs are not built for the install and dist targets if they don't exist
87 # for some weird reason.
88 # Make complains although we have rules for them in $(DEPENDFILE), so we
89 # must not include the TOCs in $(docfiles) and have to use the install and
91 dist-hook: $(tocfiles)
92 for i in $(tocfiles); \
94 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
95 else file="$$i"; fi; \
96 cp -p "$$file" "$(distdir)"; \
98 install-data-hook: $(tocfiles)
99 for i in $(tocfiles); \
101 if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
102 else file="$$i"; fi; \
103 $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
107 for i in $(tocfiles); \
109 $(RM) "$(DESTDIR)$(docdir)/$$i" ; \