Suppress echo of command invocation in makefile?

前端 未结 4 743
迷失自我
迷失自我 2021-01-30 06:13

I wrote a program for an assignment which is supposed to print its output to stdout. The assignment spec requires the creation of a Makefile which when invoked as make run

4条回答
  •  囚心锁ツ
    2021-01-30 06:18

    You can also use .SILENT

    .SILENT: run
    hi:
         echo "Hola!"
    run:
         java myprogram
    

    In this case, make hi will output command, but make run will not output.

提交回复
热议问题