Dear Frederico, I just read (again) this:
http://make.mad-scientist.net/papers/how-not-to-use-vpath/ you should do this too. Best, Bert On Thu, Mar 29, 2018 at 9:21 AM, Federico Bruni <f...@inventati.org> wrote: > 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 _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make