When I run the makefile at the bottom, I receive the error:
make: *** No rule to make target 'xhtml/%.html', needed by 'manifold/01_doehmer_syntax_pre.zip'. Stop.
I do not understand this error, because there is a rule with target xhtml/%.html
. Why does this rule not count?
I run this in a folder that contains the file 01_doehmer_aspekte.docx
.
BINDIR:=~/TEIC-XSLT/bin
PROFDIR:=/mnt/c/Users/niels-oliver.walkows/OneDrive/Dokumente/Luxemburg/Melusinapress/Transformationen/xslt/TEIC/profiles
MANUSCRIPTFILE:=$(shell ls *.docx)
MANUSCRIPTNAME:=$(shell basename ${MANUSCRIPTFILE} .docx)
.PHONY : all clean
all: manifold/${MANUSCRIPTNAME}.zip
tei/%.xml: %.docx
mkdir -p tei
${BINDIR}/docxtotei --profiledir=${PROFDIR} --profile=melusina $< $@
xhtml/%.html: tei/%.xml
mkdir -p xhtml
${BINDIR}/teitohtml --profiledir=${PROFDIR} --profile=melusina $< $@
cp -r tei/media xhtml/
manifold/${MANUSCRIPTNAME}.zip: xhtml/%.html
mkdir -p manifold
touch manifold/manifest.yml
cp -r tei/media manifold/
cp -r xhtml/*.html manifold/
cd manifold && zip -r ${MANUSCRIPTNAME}.zip manifest.yml media *.html
rm -rf manifold/media manifold/${MANUSCRIPTNAME}.html
test:
echo "${MANUSCRIPTFILE}"
echo "${MANUSCRIPTNAME}"
clean:
rm -rf tei xhtml manifold
manifold/${MANUSCRIPTNAME}.zip: xhtml/%.html
, there's no%
in the targetmanifold/${MANUSCRIPTNAME}.zip
, so what is the%
in the prerequisite supposed to match?%
in not a glob, it is a pattern matching character. You used it in place of a glob (manifold/${MANUSCRIPTNAME}.zip: xhtml/%.html
). It was interpreted as a literal character.