[Top][All Lists]

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

No rule to make target... problem

From: Subra
Subject: No rule to make target... problem
Date: Thu, 3 Apr 2008 11:29:51 -0700 (PDT)
User-agent: G2/1.0


I have a problem with pattern rules. I simplified my Makefile and got
the following:

.PHONY: all create

all: create file.out

        touch file.ext

%.out : %.ext
        mv file.ext file.out

After invoking make I get "make: *** No rule to make target
`file.out', needed by `all'. Stop." Then when I invoke make for the
second time everything seems to work just fine. As I understand it the
prerequisite "file.out" should be matched with the pattern "%.out" and
the stem % should then be replaced by "file" making the "%.ext"
prerequisite look: "file.ext". The file in turn was already created by
the "create" rule. However, it does not work.
Please, can someone help solve this problem?

reply via email to

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