Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike@mikegerwitz.com>2013-05-26 21:01:07 -0400
committerMike Gerwitz <mike@mikegerwitz.com>2013-05-26 21:01:07 -0400
commit66ecf830c67a73b7722646c0216c5f48c27a029e (patch)
treebc99f20cd0fd435eb46178c989d1075a1db0371e /Makefile
parente74b27e1971b4f5d0249f2463d678fabd23561ad (diff)
downloadthoughts-66ecf830c67a73b7722646c0216c5f48c27a029e.tar.gz
thoughts-66ecf830c67a73b7722646c0216c5f48c27a029e.tar.bz2
thoughts-66ecf830c67a73b7722646c0216c5f48c27a029e.zip
Main content pages (now *.{txt=>pg}) will now be processed with repo2html
Provides for a cleaner integration which is difficult with asciidoc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 19 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 4b26e48..03287da 100644
--- a/Makefile
+++ b/Makefile
@@ -16,25 +16,29 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-# list of articles to compile
+pages := $(patsubst %.pg, %.html, \
+ $(shell find docs/ -name '*.pg'))
articles := $(patsubst %.txt, %.html, \
$(shell find docs/ -name '*.txt'))
www_root := www-root/
-.PHONY: default clean articles thoughts
-
-default: www-root
-
-thoughts:
- mkdir -p "$(www_root)"
- repo2html \
+# configured repo2html command
+repo2html := repo2html \
-t 'Mike Gerwitz' \
-d 'Free Software Hacker' \
-c 'Mike Gerwitz' \
-l 'Verbatim redistribution of this document in its entirety is permitted provided that this copyright notice is preserved.' \
-C '/style.css' \
-T "$(PWD)/tpl" \
- -E \
+ -E
+
+.PHONY: default clean pages articles thoughts
+
+default: www-root
+
+thoughts:
+ mkdir -p "$(www_root)"
+ $(repo2html) \
-R 40 \
-o "$(www_root)" \
'http://mikegerwitz.com/thoughts/' \
@@ -49,8 +53,13 @@ thoughts:
$<
./tools/mgify "$@"
+%.html: %.pg
+ $(repo2html) -i index < $< > $@
+
+pages: $(pages)
articles: $(articles)
-www-root: articles thoughts
+docs: pages articles
+www-root: docs thoughts
mkdir -p www-root/papers
( cd docs/ && find . -name '*.html' -exec ../tools/doc-cp {} ../www-root/{} \; )
cp -r images/ www-root/