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