49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
|
# ==============================================================================
|
||
|
# FAQ Makefile 2021-01-30 11:00:47
|
||
|
# ==============================================================================
|
||
|
#
|
||
|
# Simple Makefile to rebuild the components in this file
|
||
|
#
|
||
|
all : markdown
|
||
|
|
||
|
#
|
||
|
# Find all *.mkd files in the current directory and turn them into a list of
|
||
|
# *.html files as a rule target
|
||
|
#
|
||
|
markdown: $(addsuffix .html,$(basename $(wildcard *.mkd)))
|
||
|
|
||
|
#
|
||
|
# Rule to get from a Markdown (*.mkd) file to an HTML equivalent allowing for
|
||
|
# Template Toolkit stuff within the file
|
||
|
#
|
||
|
%.html: %.mkd; tpage $< | pandoc -f markdown-smart -t html5 --standalone \
|
||
|
--template=hpr.html5 -c http://hackerpublicradio.org/css/hpr.css \
|
||
|
--number-sections --table-of-contents --toc-depth=4 -o $@
|
||
|
|
||
|
#
|
||
|
# Upload the FAQ HTML to the server for development
|
||
|
#
|
||
|
upload:
|
||
|
scp -P 22074 FAQ.html hpr@hackerpublicradio.org:www/
|
||
|
|
||
|
#
|
||
|
# Use 'make sync' to copy updates to the visible project area
|
||
|
#
|
||
|
# Note that the filter file needs to be edited when new files are to be
|
||
|
# included.
|
||
|
#
|
||
|
sync: put
|
||
|
|
||
|
fromdir = $(HOME)/HPR/FAQ/
|
||
|
todir = $(HOME)/HPR/Projects/hpr-admin/FAQ/
|
||
|
filter = $(fromdir).rsync_export
|
||
|
syncmsg = Updating git directory with updates from development version
|
||
|
|
||
|
put:
|
||
|
@echo ">> $(basedir)"
|
||
|
@echo "** $(syncmsg)"
|
||
|
rsync -vaP --filter=". $(filter)" $(fromdir) $(todir)
|
||
|
|
||
|
.PHONY: upload sync put
|
||
|
|