Hi

I'm having problem with a simple Makefile which uses a pattern rule to generate PDF files from markdown files.
What I'm doing wrong?

[makefile-tests]$ tree .
.
|-- Makefile
|-- out
`-- src
   |-- bar.md
   `-- foo.md

2 directories, 3 files
[makefile-tests]$
[makefile-tests]$ cat Makefile
VPATH = \
 $CURDIR/src \
 $CURDIR/out

all: book

%.pdf: %.md
        pandoc -f markdown -o $(CURDIR)/out/$@ $(CURDIR)/src/$<;

# Find the PDF files to be built
book: $(addsuffix .pdf, $(notdir $(basename $(wildcard src/*.md))))

# Check target list
test:
        echo "$(addsuffix .pdf, $(notdir $(basename $(wildcard src/*.md))))"
[makefile-tests]$
[makefile-tests]$ make
make: *** No rule to make target 'bar.pdf', needed by 'book'.  Stop.
[makefile-tests]$




_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to