Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way for "make" to echo commands

Tags:

makefile

Is there a way to have make echo commands that are manually suppressed with @ in the makefile? I can't find this in the help or man page, it just says "--quiet" to do the opposite.

like image 363
gatoatigrado Avatar asked Dec 09 '10 08:12

gatoatigrado


People also ask

How do you echo a command?

Echo Command Options-E : The default option, disables the interpretation of escape characters. -e : Enables the interpretation of the following escape characters: \\: Displays a backslash character (\). \a : Plays a sound alert when displaying the output.

What does echo do in Makefile?

5.2 Recipe Echoing Normally make prints each line of the recipe before it is executed. We call this echoing because it gives the appearance that you are typing the lines yourself.

How do you write echo command in Linux?

Print "Hello All": For printing text "Hello All!" on the terminal, we can use the below command: Example: $ echo "Hello All!"


1 Answers

  • The most obvious idea is to change the shell that runs the commands, e.g. modify your makefile and add to the top SHELL = sh -xv.
  • Another solution is to change how you call make to make SHELL='sh -xv'
  • Lastly if your Makefile is generated by cmake then call make with make VERBOSE=1
like image 186
reinierpost Avatar answered Oct 01 '22 20:10

reinierpost