0

I tried by adding the space tab before cp command till observing the same issue. The go Makefile is as follow: $cat Makefile

GOOS ?= $(shell go env GOOS)
TEMPLATE_PATH:= $(shell mktemp -d)
ifeq ($(GOARCH),amd64)
       TAG ?= -v1.10.1
       TAG_NONE ?=
endif

cp ./template/* $(TEMPLATE_PATH)
cd $(TEMPLATE_PATH) && sed -i.back "s|TAG|$(TAG)|g" deploy.yaml
cd $(TEMPLATE_PATH) && sed -i.back "s|TAG_NONE|$(TAG_NONE)|g" deploy.yaml

out/mybinary:
       echo "Hello!"

On running $ make out/mybinary command I get the error "Makefile:8: *** missing separator. Stop."

Jens
  • 69,818
  • 15
  • 125
  • 179
R_SS
  • 317
  • 5
  • 21
  • Did you read and apply all the other answers to exactly that problem? – Jens May 30 '18 at 09:53
  • I tried all other answers, I did have added the tab space still observed the same issue. – R_SS May 30 '18 at 10:04
  • This question isn't really a duplicate of the other question linked here. In this question, you don't even have a makefile at all: you have no rules defined, only recipes. No amount of adding TABs will fix this... – MadScientist May 30 '18 at 13:06
  • I do have rules. I thought like too much info to the question. However just the make should work with message "make: *** No targets. Stop.". Anyway editing question with rule. – R_SS May 31 '18 at 04:43
  • Your cp and cd commands are not in any rule. You can't have commands outside rules. – Jens May 31 '18 at 10:09

0 Answers0