help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No rule to make target


From: Bert Wesarg
Subject: Re: No rule to make target
Date: Thu, 29 Mar 2018 10:01:54 +0200

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 <address@hidden> 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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make



reply via email to

[Prev in Thread] Current Thread [Next in Thread]