Skip to content
Advertisement

Maikefile error make: *** [prepare] Error 127

I get the following error form the Makefile:

VERSION=`git describe --abbrev=0 --tags`
TAG=$(VERSION)

all: prepare

prepare:
    $(TAG)

Error:

`git describe --abbrev=0 --tags`
/bin/sh: v1.1.2: command not found
make: *** [prepare] Error 127

What am I doing wrong?

Advertisement

Answer

your subshell command git describe --abbrev=0 --tags is executed an returns the string “v1.1.2”. Make then tries to execute it as a program.

prepare:
    echo $(TAG)

should work

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement