]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/Makefile.am
Spanish updates from Ignacio
[lyx.git] / lib / doc / Makefile.am
index cff57aee81527648a54ccd360d4a1767b69916de..547fd222079a1b73f9d2d1ddcacca94ba5952108 100644 (file)
@@ -1,10 +1,10 @@
 include $(top_srcdir)/config/common.am
 
-DISTCLEANFILES += LyXConfig.lyx LaTeXConfig.lyx $(TOCs)
+DISTCLEANFILES += $(tocfiles)
 
-EXTRA_DIST = depend.py doc_toc.py LyXConfig.lyx.in README.Documentation $(DEPENDFILE) $(docfiles)
+EXTRA_DIST = depend.py doc_toc.py README.Documentation $(DEPENDFILE) $(docfiles)
 
-docfiles = $(TOCs) \
+docfiles = \
        cs_Tutorial.lyx \
        Customization.lyx \
        da_Intro.lyx \
@@ -17,12 +17,14 @@ docfiles = $(TOCs) \
        DocStyle.lyx \
        es_Intro.lyx \
        es_Tutorial.lyx \
+       es_EmbeddedObjects.lyx \
        eu_Customization.lyx \
        eu_Extended.lyx \
        eu_FAQ.lyx \
        eu_Intro.lyx \
        eu_Tutorial.lyx \
        eu_UserGuide.lyx \
+       EmbeddedObjects.lyx \
        Extended.lyx \
        FAQ.lyx \
        fr_Customization.lyx \
@@ -31,9 +33,12 @@ docfiles = $(TOCs) \
        fr_Intro.lyx \
        fr_Tutorial.lyx \
        fr_UserGuide.lyx \
+       gl_Intro.lyx \
+       gl_Tutorial.lyx \
        he_Intro.lyx \
        he_Tutorial.lyx \
        hu_Intro.lyx \
+       hu_Tutorial.lyx \
        Intro.lyx \
        it_Customization.lyx \
        it_Intro.lyx \
@@ -42,7 +47,7 @@ docfiles = $(TOCs) \
        LaTeXConfig.lyx.in \
        nl_Intro.lyx \
        nl_Tutorial.lyx \
-       no_Intro.lyx \
+       nb_Intro.lyx \
        pl_Extended.lyx \
        pl_Intro.lyx \
        pl_Tutorial.lyx \
@@ -66,22 +71,44 @@ docfiles = $(TOCs) \
        platypus.eps
 
 docdir = $(pkgdatadir)/doc
-doc_DATA = \
-       $(docfiles) \
-       LaTeXConfig.lyx
+doc_DATA = $(docfiles) 
 
-DEPENDFILE = Makefile.depend
-include $(DEPENDFILE)
+DEPENDFILE = $(srcdir)/Makefile.depend
+# include $(DEPENDFILE) does not work because automake is too limited.
+include $(srcdir)/Makefile.depend
 
-TOCs : $(DEPENDFILE) $(TOCs)
+TOCs : $(DEPENDFILE) $(tocfiles)
        @echo Made TOCs succesfully.
 
 # Force regeneration of $(DEPENDFILE) when Makefile.am changes because
 # new doc files might have been added
-$(DEPENDFILE): Makefile.am
+$(DEPENDFILE): $(srcdir)/Makefile.am $(srcdir)/depend.py
        python $(srcdir)/depend.py > $(DEPENDFILE)
 
-# Force generation of the TOC files for 'make dist'
-distdir: TOCs
+# The TOCs are not built for the install and dist targets if they don't exist
+# for some weird reason.
+# Make complains although we have rules for them in $(DEPENDFILE), so we
+# must not include the TOCs in $(docfiles) and have to use the install and
+# dist hooks below.
+dist-hook: $(tocfiles)
+       for i in $(tocfiles); \
+       do \
+               if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
+               else file="$$i"; fi; \
+               cp -p "$$file" "$(distdir)"; \
+       done
+install-data-hook: $(tocfiles)
+       for i in $(tocfiles); \
+       do \
+               if test -f "$(srcdir)/$$i"; then file="$(srcdir)/$$i"; \
+               else file="$$i"; fi; \
+               $(docDATA_INSTALL) "$$file" "$(DESTDIR)$(docdir)/$$i"; \
+       done
+
+uninstall-local:
+       for i in $(tocfiles); \
+       do \
+               $(RM) "$(DESTDIR)$(docdir)/$$i" ; \
+       done
 
 .PHONY: TOCs