make: Nothing to be done for `all'

前端 未结 7 1816
北荒
北荒 2020-11-29 21:14

I am going through an eg pgm to create a make file.

http://mrbook.org/tutorials/make/

My folder eg_make_creation contains the following files,



        
相关标签:
7条回答
  • 2020-11-29 22:12

    Sometimes "Nothing to be done for all" error can be caused by spaces before command in makefile rule instead of tab. Please ensure that you use tabs instead of spaces inside of your rules.

    all:
    <\t>$(CC) $(CFLAGS) ...
    

    instead of

    all:
        $(CC) $(CFLAGS) ...
    

    Please see the GNU make manual for the rule syntax description: https://www.gnu.org/software/make/manual/make.html#Rule-Syntax

    0 讨论(0)
提交回复
热议问题