-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
293 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
######################################################################## | ||
# Specific makefile for this web site | ||
######################################################################## | ||
|
||
# Options for `jqt`. | ||
JQTFLAGS += \ | ||
-5 \ | ||
--toc-depth=4 \ | ||
-I./ \ | ||
-msite:$(Metadata)/config.json \ | ||
-msections:$(Metadata)/sections.json \ | ||
-msnippets:$(Metadata)/snippets.json \ | ||
-iblocks/filters \ | ||
-j'$$'pages:$(Metadata)/pages \ | ||
|
||
# Snippets | ||
$(Metadata)/snippets.json: $(Data)/snippets.yaml \ | ||
| $(Metadata) | ||
$(info ==> $@) | ||
@jqt -T < $< | yaml2json > $@ | ||
|
||
clean:: | ||
@rm -f $(Metadata)/snippets.json | ||
|
||
# Extra dependencies | ||
$(DestinationPages): $(Metadata)/snippets.json # $(Blocks)/filters.jq $(Blocks)/*/*.html $(Blocks)/*/*/*.html | ||
|
||
######################################################################## | ||
# Generate man page for jqt | ||
######################################################################## | ||
|
||
# gpp for the man page (to be build without calling jqt!) | ||
GPP_MD := gpp \ | ||
-U '<%' '>' '\B' '\B' '\W>' '<' '>' '$$' '' \ | ||
-M '<%' '>' '\B' '\B' '\W>' '<' '>' \ | ||
+sccc '&\n' '' '' \ | ||
+sccc '\\n' '' '' \ | ||
+sccc '<\#' '\#>\n' '' \ | ||
+siqi "'" "'" '\' \ | ||
+siQi '"' '"' '\' \ | ||
+ssss '<!--' '-->' '' \ | ||
+ssss '`' '`' '' \ | ||
+ssss '\n```' '\n```' '' \ | ||
+ssss '\n~~~' '\n~~~' '' \ | ||
# | ||
ManPage := ../jqt.1.gz | ||
|
||
# Man page: jqt(1) | ||
$(ManPage): $(Content)/jqt.1.text | ||
$(info ==> $@) | ||
@$(GPP_MD) -I$(Content) < $< \ | ||
| pandoc --standalone --from markdown --to man \ | ||
| gzip > $@ | ||
|
||
# Add prerequisites and recipes to common targets | ||
all:: $(ManPage) | ||
|
||
clean:: | ||
@rm -f $(ManPage) | ||
|
||
clobber:: | ||
@rm -f $(ManPage) | ||
|
||
######################################################################## | ||
# Generate help text | ||
######################################################################## | ||
|
||
# Independent target: helps generating text for `jqt -h` | ||
# Needs explicit call: `make /tmp/help` | ||
/tmp/help: $(Content)/help.text | ||
$(info ==> $@) | ||
@jqt -P MarkDown -I$(Content) < $< \ | ||
| pandoc --from markdown --to plain - \ | ||
| sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \ | ||
> $@ | ||
|
||
clean:: | ||
@rm -f /tmp/help | ||
|
||
# vim:ai:sw=8:ts=8:noet:fileencoding=utf8:syntax=make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.