Typping make/code> (Gnu Making) with the following
Makefile
(assuming file x
and foo.y
are Disappearance
all: foo.z
foo.z: foo.x foo.y
cat foo.x foo.y > foo.z
生成错误信息:
make: *** No rule to make target `foo.x , needed by `foo.z . Stop.
但是,Makefile
:
all: foo.z
%.z: %.x %.y
cat %.x %.y > %.z
产生这一错误信息:
make: *** No rule to make target `foo.z , needed by `all . Stop.
In the first case, the rule is applied, and a dependency if found to be missing. In the second case, the rule is found to be not appropriate, and that is a rule that is missing.
我想使用第二个<代码>Makefile(我有许多条码>*.z的标语,但有一个象第一个<代码>Makefile那样的错误信息。 我的<代码>make输出被封不动,而扩大的缺失档案名称将有助于分解。
是否可能? 或许是强迫使用该规则的一种方式?
当然,Im没有编造档案,这只是一个例子。