summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorArun Isaac2021-06-29 18:09:27 +0530
committerArun Isaac2021-07-02 16:01:32 +0530
commitc550ff6cdc8264c66c13ab3b21e61fccedf9735e (patch)
treeeb37276ead63f54604301adaff733772b6772e0a /Makefile.am
parent68327fda24b852ec4daed02ad677c49da75c38aa (diff)
downloadccwl-c550ff6cdc8264c66c13ab3b21e61fccedf9735e.tar.gz
ccwl-c550ff6cdc8264c66c13ab3b21e61fccedf9735e.tar.lz
ccwl-c550ff6cdc8264c66c13ab3b21e61fccedf9735e.zip
Makefile: Track dependencies automatically.
* build-aux/find-dependencies.scm: New file. * Makefile.am (DOC_IMAGES): Delete variable. (.depends): New target. Include it in the Makefile. ($(SKRIBILO_BUILD_DIR)/ccwl.info, $(SKRIBILO_BUILD_DIR)/ccwl.html): Depend on DOC_OTHER_DEPENDENCIES. (clean-local): Delete .depends. * .gitignore: Add .depends.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 3061b74..be17f08 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,9 +66,13 @@ EXTRA_DIST += \
# Build documentation
SKRIBILO_BUILD_DIR = $(srcdir)/doc/skribilo
-DOC_IMAGES = $(addprefix $(SKRIBILO_BUILD_DIR)/, \
- checksum.svg \
- decompress-compile-run.svg)
+
+.depends: build-aux/find-dependencies.scm doc/ccwl.skb
+ $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE) --no-auto-compile $< > $@
+
+# We prefix with - so that automake does not fail when .depends is
+# missing.
+-include .depends
$(SKRIBILO_BUILD_DIR)/%.cwl: doc/%.scm
$(MKDIR_P) $(SKRIBILO_BUILD_DIR)
@@ -88,11 +92,11 @@ $(SKRIBILO_BUILD_DIR)/%.cwl: doc/%.scm
info-local: $(SKRIBILO_BUILD_DIR)/ccwl.info
html-local: $(SKRIBILO_BUILD_DIR)/ccwl.html
-$(SKRIBILO_BUILD_DIR)/ccwl.info: doc/ccwl.skb ccwl/skribilo.scm $(DOC_IMAGES)
+$(SKRIBILO_BUILD_DIR)/ccwl.info: doc/ccwl.skb ccwl/skribilo.scm $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES)
$(MKDIR_P) $(SKRIBILO_BUILD_DIR)
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(SKRIBILO) -t info $< -o $@
-$(SKRIBILO_BUILD_DIR)/ccwl.html: doc/ccwl.skb ccwl/skribilo.scm $(DOC_IMAGES)
+$(SKRIBILO_BUILD_DIR)/ccwl.html: doc/ccwl.skb ccwl/skribilo.scm $(DOC_IMAGES) $(DOC_OTHER_DEPENDENCIES)
rm -rf $@
$(MKDIR_P) $@
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(SKRIBILO) -t html $< -o $@/index.html
@@ -127,4 +131,4 @@ website/manual/dev/en: $(SKRIBILO_BUILD_DIR)/ccwl.html
# The clean target depends on clean-local. We use clean-local to clean
# up the website and the skribilo build directory.
clean-local:
- rm -rf website/index.html website/manual $(SKRIBILO_BUILD_DIR)
+ rm -rf .depends website/index.html website/manual $(SKRIBILO_BUILD_DIR)