diff doc/manual/buildrules.sh @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/manual/buildrules.sh	Sat Dec 22 17:52:45 2007 -0500
@@ -0,0 +1,19 @@
+#!/bin/sh
+# buildrules.sh - create make rules for manual
+# usage: echo $(SUBTEXFILES) | buildrules.sh > rules.mk
+
+tr ' ' '\n' | sed 's/\.tex$//' | awk '
+    {
+	printf "usersguide.pdf: $(SRCDIR)/%s.tex\n", $1;
+	basedep($1);
+	printf "%s.pdf: $(SRCDIR)/%s.tex\n", $1, $1;
+	printf "\t@$(SRCDIR)/buildchapter.sh %s.tex\n", $1;
+    }
+    END {
+	basedep("usersguide");
+    }
+
+    function basedep(f) {
+	printf "%s.pdf: $(SRCDIR)/$(DEFSFILE)\n", f;
+    }
+'