Files
cwsvJudo/infoZettelOrg/Makefile
2020-02-02 09:00:14 +01:00

71 lines
2.1 KiB
Makefile

infoZettel=$(patsubst %.md,%.pdf,$(wildcard *.md))
kyuZettel=$(patsubst %.md,%.pdf,$(wildcard kyuZettel/*.md))
aushaenge=$(patsubst %.md,%.pdf,$(wildcard aushang/*.md))
infoZettelUploads=$(addprefix uploadTouch/, $(wildcard *.md)) $(addprefix uploadTouch/, $(wildcard *.pdf))
.PHONY: all
#all: infoZettel infoZettelUpload aushaenge
all: infoZettelUpload aushaenge
.PHONY: infoZettel
infoZettel: $(infoZettel)
.PHONY: kyuZettel
kyuZettel: $(kyuZettel)
.PHONY: aushaenge
aushaenge: $(aushaenge)
%.pdf: %.md
pandoc \
--template=pandocTemplate-cwsvJudoZettel.latex \
--variable documentclass=scrartcl \
--variable classoption="twoside=true" \
--variable classoption="DIV=28" \
--variable classoption="BCOR=0mm" \
--variable classoption="paper=A6" \
--variable classoption="fontsize=12pt" \
--variable classoption="parskip=never" \
--variable classoption="headsepline=true" \
--variable classoption="headheight=1cm" \
--variable classoption="footsepline=true" \
--variable classoption="footheight=1cm" \
--output=$@ \
$^
aushang/%.pdf: aushang/%.md
pandoc \
--template=pandocTemplate-cwsvJudoAushang.latex \
--variable documentclass=scrartcl \
--variable classoption="twoside=true" \
--variable classoption="DIV=28" \
--variable classoption="BCOR=0mm" \
--variable classoption="paper=A4" \
--variable classoption="fontsize=16pt" \
--variable classoption="parskip=never" \
--variable classoption="headsepline=true" \
--variable classoption="headheight=1cm" \
--variable classoption="footsepline=true" \
--variable classoption="footheight=1cm" \
--output=$@ \
$^
.PHONY: infoZettelUpload
#infoZettelUpload: $(infoZettelUploads)
infoZettelUpload: infoZettel
curl -T "{$$(echo *.md | tr ' ' ',')}" ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/infoZettel/
uploadTouch/%.md: %.md
curl --verbose --upload-file $^ ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/infoZettel/$^
touch $@
uploadTouch/%.pdf: %.pdf
curl --verbose --upload-file $^ ftp://cwsvjudo:***REMOVED***@cwsvjudo.bplaced.net/www/temp/druck/$^
touch $@
.PHONY: echo
echo:
# @echo $(infoZettel)
# @echo $(infoZettelUploads)
@echo $(aushaenge)