Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Makefile: target pattern contains no `%'

Tags:

makefile

Why does my Makefile not work?

makefile:

app-reset:
     bin/console avanzu:admin:fetch-vendor

make app-reset is returning:

makefile:3: *** target pattern contains no `%'.  Stop.
like image 421
Sancho Avatar asked Apr 21 '26 19:04

Sancho


1 Answers

As explained in https://www.gnu.org/software/make/manual/make.html#Recipe-Syntax, every line in your build recipe must start with a tab character. If you use anything else (such as a sequence of spaces), you get confusing errors.

Usually this manifests as Makefile:42: *** missing separator. Stop. but in your case the colons (:) in your command confused make into thinking you were trying to define a pattern rule.

In any case, the solution is to use a tab character instead. (Or, if you are using GNU make, set .RECIPEPREFIX.)

like image 139
melpomene Avatar answered Apr 25 '26 09:04

melpomene