LoginSignup
2
0

More than 1 year has passed since last update.

Makefile で *** target pattern contains no `%'. Stop. エラーが発生する

Posted at

現象

例えば以下のような Makefile にて発生する。

foo-%:
    echo foo

エラー

上記を実行すると、以下のエラーが発生する。

$ make foo-bar       
Makefile:1: *** target pattern contains no `%'.  Stop.

ターゲットに % は含まれているはずだが、果たして、、、。

原因

レシピのインデントがスペースになっている。

解決策

Makefile はタブが大好物なので、忖度する。

foo-%:
    echo foo

あるあるではあるが、以上。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0