about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2021-11-05 12:26:19 +0530
committerArun Isaac2021-11-05 16:20:27 +0530
commit0aaa24217d39a87636003a43719379f81e556e40 (patch)
tree76e6df8d6de95431a09f8b03cfc7b46607fa8b81
parent4bea0b85e1992a01dd36d32c8b2c68a497c6d001 (diff)
downloadccwl-0aaa24217d39a87636003a43719379f81e556e40.tar.gz
ccwl-0aaa24217d39a87636003a43719379f81e556e40.tar.lz
ccwl-0aaa24217d39a87636003a43719379f81e556e40.zip
Makefile: Distinguish DOC_OTHER from DOC_OUT.
DOC_OTHER includes dependencies that are neither scm files nor out
files, but are primary sources required for the build.

* Makefile.am (EXTRA_DIST): Add DOC_OTHER.
(doc/ccwl.info, doc/ccwl.html): Depend on DOC_OTHER.
* build-aux/find-dependencies.scm: Output DOC_OTHER.
(find-dependencies): Classify source forms as type 'out or type 'other
based on extension.
-rw-r--r--Makefile.am5
-rw-r--r--build-aux/find-dependencies.scm10
2 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 58686e1..5e92638 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -92,6 +92,7 @@ EXTRA_DIST +=			\
   doc/hello.tar                 \
   doc/hello.txt                 \
   $(DOC_SCM)                    \
+  $(DOC_OTHER)                  \
   COPYING			\
   README.org
 
@@ -149,10 +150,10 @@ SKRIBILO_FLAGS = --source-path=$(srcdir) --image-path=$(builddir)
 CLEANFILES += doc/ccwl.info doc/skribilo.go
 CLEAN_DIRECTORIES += doc/ccwl.html
 
-doc/ccwl.info: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_SCM) $(DOC_OUT)
+doc/ccwl.info: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_SCM) $(DOC_OUT) $(DOC_OTHER)
 	$(SKRIBILO_GEN)$(builddir)/pre-inst-env $(SKRIBILO) $(SKRIBILO_FLAGS) -t info $< -o $@
 
-doc/ccwl.html: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_SCM) $(DOC_OUT)
+doc/ccwl.html: doc/ccwl.skb doc/skribilo.go $(DOC_IMAGES) $(DOC_SCM) $(DOC_OUT) $(DOC_OTHER)
 	rm -rf $@
 	$(MKDIR_P) $@
 	$(SKRIBILO_GEN)$(builddir)/pre-inst-env $(SKRIBILO) $(SKRIBILO_FLAGS) -t html $< -o $@/index.html
diff --git a/build-aux/find-dependencies.scm b/build-aux/find-dependencies.scm
index 4cd20c5..d40a389 100644
--- a/build-aux/find-dependencies.scm
+++ b/build-aux/find-dependencies.scm
@@ -50,7 +50,9 @@ dependency is of the form (tag . file). tag may either be the symbol
             args))
     (('source args ...)
      (apply (lambda* (#:key file #:allow-other-keys)
-              `((out . ,file)))
+              (if (string-suffix? ".out" file)
+                  `((out . ,file))
+                  `((other . ,file))))
             args))
     (('scheme-source file)
      `((scm . ,file)))
@@ -80,4 +82,10 @@ dependency is of the form (tag . file). tag may either be the symbol
                                      (('out . file) file)
                                      (_ #f))
                                    dependencies)
+                       " "))
+  (format #t "DOC_OTHER = ~a~%"
+          (string-join (filter-map (match-lambda
+                                     (('other . file) file)
+                                     (_ #f))
+                                   dependencies)
                        " ")))