summary refs log tree commit diff
path: root/Makefile.am
diff options
context:
space:
mode:
authorArun Isaac2021-06-15 16:45:49 +0530
committerArun Isaac2021-06-15 17:53:25 +0530
commitbf485dd43386305177a2ba3ea1a5ee7e164984c6 (patch)
treeacbd8beaa7b298fd185601308382969f8aa77682 /Makefile.am
parent6bc13f2df1395fe6b5c197dca8b24a959d02e5c1 (diff)
downloadccwl-bf485dd43386305177a2ba3ea1a5ee7e164984c6.tar.gz
ccwl-bf485dd43386305177a2ba3ea1a5ee7e164984c6.tar.lz
ccwl-bf485dd43386305177a2ba3ea1a5ee7e164984c6.zip
doc: Move documentation from texinfo to skribilo.
* doc/ccwl.texi: Delete file.
* ccwl/skribilo.scm, doc/ccwl.skb,
doc/capture-output-file-with-parameter-reference.out,
doc/capture-output-file-with-parameter-reference.scm,
doc/capture-output-file.out, doc/capture-output-file.scm,
doc/capture-stdout.out, doc/capture-stdout.scm, doc/checksum.out,
doc/checksum.scm, doc/decompress-compile-run.out,
doc/decompress-compile-run.scm, doc/hello-world.out,
doc/hello-world.scm, doc/hello.tar.out: New files.
* configure.ac: Check for skribilo.
* Makefile.am: Unregister doc/ccwl.texi. Add documentation build
rules.
* guix.scm (ccwl)[native-inputs]: Replace texinfo with skribilo.
* .gitignore: Add doc/skribilo. Remove doc/version.texi, doc/*.html,
doc/*.info.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am45
1 files changed, 36 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 8eab1cb..33b0426 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,6 @@ moddir = $(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
 godir  = $(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
 
 bin_SCRIPTS = scripts/ccwl
-info_TEXINFOS = doc/ccwl.texi
 
 SOURCES =			\
   ccwl/ccwl.scm 		\
@@ -64,9 +63,38 @@ EXTRA_DIST +=			\
   COPYING			\
   README.org
 
-# Build website
+# Build documentation
+
+SKRIBILO_BUILD_DIR = $(srcdir)/doc/skribilo
+
+# 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
+
+$(SKRIBILO_BUILD_DIR)/ccwl.info: doc/ccwl.skb
+	$(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
+	$(MKDIR_P) $(SKRIBILO_BUILD_DIR)
+	$(AM_V_GEN)$(top_builddir)/pre-inst-env $(SKRIBILO) -t html $^ -o $@
+
+install-data-local: install-info-local
 
-AM_MAKEINFOHTMLFLAGS = --css-ref=/style.css
+install-info-local: $(SKRIBILO_BUILD_DIR)/ccwl.info
+	$(MKDIR_P) $(DESTDIR)$(infodir)
+	$(INSTALL_DATA) $(SKRIBILO_BUILD_DIR)/ccwl.info $(DESTDIR)$(infodir)
+
+install-html-local: $(SKRIBILO_BUILD_DIR)/ccwl.html
+	$(MKDIR_P) $(DESTDIR)$(htmldir)
+	$(INSTALL_DATA) $(SKRIBILO_BUILD_DIR)/ccwl.html $(DESTDIR)$(htmldir)
+
+uninstall-local:
+	rm -f $(DESTDIR)$(infodir)/ccwl.info $(DESTDIR)$(htmldir)/ccwl.html
+
+# Build website
 
 website: website/index.html website/style.css website/manual/dev/en
 
@@ -78,12 +106,11 @@ website/style.css: style.css
 	mkdir -p $(dir $@)
 	cp -v $< $@
 
-website/manual/dev/en: doc/ccwl.html
-	rm -rf $@
-	mkdir -p $(dir $@)
-	cp -vr doc/ccwl.html $@
+website/manual/dev/en: $(SKRIBILO_BUILD_DIR)/ccwl.html
+	$(MKDIR_P) $@
+	cp -v $< $@/index.html
 
 # The clean target depends on clean-local. We use clean-local to clean
-# up the website built by the website target.
+# up the website and the skribilo build directory.
 clean-local:
-	rm -rf website
+	rm -rf website $(SKRIBILO_BUILD_DIR)