summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-13 18:20:42 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-13 18:23:00 (EDT)
commit7eea1f2b86f532dd3e9e87ae192ed53d42a05ce7 (patch)
treeff4a12f425fd7bda61430c0c8471ef291fd854d9 /Makefile
parent46951f0112567668902bdc73071c614e2276e9b9 (diff)
Add markdownbook stuff to Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 37 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f075102..0eae244 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,24 @@
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
.SUFFIXES:
.SUFFIXES: .txt .html
@@ -6,8 +27,15 @@ SRCS = specs/source-package-format-1.0.txt \
specs/source-package-format-2.0.txt
OBJS = $(SRCS:.txt=.html)
-.PHONY: all
-all: $(OBJS)
+BOOKS =
+FORMATS = html txt
+
+# Default format in case a book target is called without FORMAT=*
+FORMAT = html
+
+all: $(OBJS) $(BOOKS)
+
+books: $(BOOKS)
$(OBJS):
@printf ' RENDER %s\n' '$@'
@@ -17,9 +45,14 @@ $(OBJS):
@markdown $*.txt >> $@
@cat include/footer.html >> $@
-.PHONY: clean
clean:
@for obj in $(OBJS); do \
- printf ' RM %s\n' "$${obj}"; \
+ printf ' CLEAN %s\n' "$${obj}"; \
rm -f $${obj}; \
done
+ @for book in $(BOOKS); do \
+ printf ' CLEAN %s\n' "$${book}"; \
+ rm -f "specs/$${book}/"*.html; \
+ rm -f "specs/$${book}/"*.txt; \
+ rm -f "specs/$${book}/"main.css; \
+ done