DEV Community

Discussion on: Streamline your projects using Makefile

Collapse
 
mjgs profile image
Mark Smith

@ symbol is for disabling the echo for recipe.

I have no idea what that means. It feels weird adding symbols to bash commands like that, where is the symbol interpreted?

In our shell we can export an environment variable called greeting.

But then the name of the variable is not ‘greeting’:

$ export INFO="Run make help to show

These sorts of small inconsistencies really break the flow of the entire piece.

Thread Thread
 
yankee profile image
Yankee Maharjan

Made the tweaks. On regards for the @ symbol, that's the standard syntax for Makefile and just how it works to disable printing the recipe to your stdout. As the note section suggests, you can try to build a rule where there is no @ symbol in the recipe to see what it means.

If you find the @ symbol weird in front of the bash commands. you can run the commands with -s flag

$ make -s <target-name>
Enter fullscreen mode Exit fullscreen mode

to disable printing the recipe to your stdout.

Hope it helps. Cheers!

Thread Thread
 
mjgs profile image
Mark Smith

It’s not clear to me what this means:

printing the recipe to your stdout

Are you saying that adding the @ causes make to suppress command output to stdout? Or is it that make doesn’t print the step name to stdout? Or something else?

It might be more obvious with some example make output.

Thread Thread
 
yankee profile image
Yankee Maharjan

Doing is knowing, so just try it out first!

Thread Thread
 
mjgs profile image
Mark Smith

Honestly I didn’t make it to the end of the article, I stopped after the second round of confusion.

Some comments have been hidden by the post's author - find out more