From 53255a4d269a7e56626cba9b6c21b1c2d95e6c39 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 4 Jul 2021 18:43:34 +0530 Subject: Makefile: Build skribilo documentation in-place. * Makefile.am (SKRIBILO_BUILD_DIR): Delete variable. (CLEANFILES): Add doc/*.cwl, doc/*.dot, doc/*.svg, doc/ccwl.info, doc/skribilo.go. ($(SKRIBILO_BUILD_DIR)/%.cwl): Rename to %.cwl. (info-local, install-info-local): Depend on doc/ccwl.info instead of $(SKRIBILO_BUILD_DIR)/ccwl.info. (html-local, install-html-local, website/manual/dev/en): Depend on doc/ccwl.html instead of $(SKRIBILO_BUILD_DIR)/ccwl.html. ($(SKRIBILO_BUILD_DIR)/ccwl.info): Rename to doc/ccwl.info. ($(SKRIBILO_BUILD_DIR)/ccwl.html): Rename to doc/ccwl.html. (clean-local): Do not delete doc/skribilo.go and $(SKRIBILO_BUILD_DIR). * .gitignore: Add doc/*.cwl, doc/*.html, doc/*.info, doc/*.svg. Remove doc/skribilo. * doc/ccwl.skb (Tutorial)[Workflow with multiple steps]: Reference images in the doc directory instead of in the doc/skribilo directory. --- Makefile.am | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index d6305a8..afe3f34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,7 +89,6 @@ EXTRA_DIST += \ # Build documentation -SKRIBILO_BUILD_DIR = $(srcdir)/doc/skribilo .depends: build-aux/find-dependencies.scm doc/ccwl.skb $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE) --no-auto-compile $< > $@ @@ -97,10 +96,10 @@ SKRIBILO_BUILD_DIR = $(srcdir)/doc/skribilo # We prefix with - so that automake does not fail when .depends is # missing. -include .depends +CLEANFILES += doc/*.cwl doc/%.dot doc/*.svg -$(SKRIBILO_BUILD_DIR)/%.cwl: doc/%.scm - $(MKDIR_P) $(SKRIBILO_BUILD_DIR) - $(CCWL_GEN)$(top_builddir)/pre-inst-env ccwl compile $< > $@ +%.cwl: %.scm + $(CCWL_GEN)$(builddir)/pre-inst-env ccwl compile $< > $@ # Print out graph for graphviz's dot, but remove file path prefix from # workflow step identifiers. @@ -113,14 +112,15 @@ $(SKRIBILO_BUILD_DIR)/%.cwl: doc/%.scm # The info and html targets depend on the info-local and html-local # targets respectively. So, we use them to extend the info and html # targets. -info-local: $(SKRIBILO_BUILD_DIR)/ccwl.info -html-local: $(SKRIBILO_BUILD_DIR)/ccwl.html +info-local: doc/ccwl.info +html-local: doc/ccwl.html -$(SKRIBILO_BUILD_DIR)/ccwl.info: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES) - $(MKDIR_P) $(SKRIBILO_BUILD_DIR) +CLEANFILES += doc/ccwl.info doc/skribilo.go + +doc/ccwl.info: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES) $(SKRIBILO_GEN)$(top_builddir)/pre-inst-env $(SKRIBILO) -t info $< -o $@ -$(SKRIBILO_BUILD_DIR)/ccwl.html: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES) +doc/ccwl.html: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES) rm -rf $@ $(MKDIR_P) $@ $(SKRIBILO_GEN)$(top_builddir)/pre-inst-env $(SKRIBILO) -t html $< -o $@/index.html @@ -134,13 +134,13 @@ install-data-local: install-info-local # The install-info and install-html targets depend on the # install-info-local and install-html-local targets respectively. Use # them to install the skribilo generated info and html documentation. -install-info-local: $(SKRIBILO_BUILD_DIR)/ccwl.info +install-info-local: doc/ccwl.info $(MKDIR_P) $(DESTDIR)$(infodir) - $(INSTALL_DATA) $(SKRIBILO_BUILD_DIR)/ccwl.info $(DESTDIR)$(infodir) + $(INSTALL_DATA) $< $(DESTDIR)$(infodir) -install-html-local: $(SKRIBILO_BUILD_DIR)/ccwl.html +install-html-local: doc/ccwl.html $(MKDIR_P) $(DESTDIR)$(htmldir) - $(INSTALL_DATA) $(SKRIBILO_BUILD_DIR)/ccwl.html $(DESTDIR)$(htmldir) + $(INSTALL_DATA) $< $(DESTDIR)$(htmldir) # The uninstall target depends on the uninstall-local target. Use it # to uninstall the installed info and html documentation. @@ -154,7 +154,7 @@ website: website/index.html website/manual/dev/en website/index.html: README.org $(EMACS_GEN)$(EMACS) -Q --script build-aux/build-home-page.el -website/manual/dev/en: $(SKRIBILO_BUILD_DIR)/ccwl.html +website/manual/dev/en: doc/ccwl.html rm -rf $@ $(MKDIR_P) $(dir $@) cp -vr $< $@ @@ -162,4 +162,4 @@ website/manual/dev/en: $(SKRIBILO_BUILD_DIR)/ccwl.html # The clean target depends on clean-local. Use clean-local to clean # up several artifacts not handled automatically by automake. clean-local: - rm -rf .depends doc/skribilo.go website/index.html website/manual $(SKRIBILO_BUILD_DIR) + rm -rf .depends website/index.html website/manual -- cgit v1.2.3