How to execute a bash script into a makefile

0

I have a simple bash script, that install and zip a NodeJS application. It's worked great local. Now I want to execute this script from a Makefile. So I wrote this code

.FOO: install_and_zip
    install_and_zip: ./install_and_zip_foo.sh

So if I run this Makefile with make foo I'm getting this error message:

make: *** No rule to make target `foo'.  Stop.

Makefile and bash script are in the same directory.

What I'm doing wrong? Can you help me to fix this Makefile?

dudi

Posted 2019-04-16T07:15:26.363

Reputation: 103

The recipe in your Makefile is called .FOO, but make foo will try to execute a recipe called foo. – gronostaj – 2019-04-16T07:43:19.057

No answers