pretty print makefiles

前端 未结 2 711
小鲜肉
小鲜肉 2021-01-31 19:32

The linux kernel (and various other projects including git) have very nice makefiles that hide the giant cc calls into nice little acronyms.

For example:



        
2条回答
  •  星月不相逢
    2021-01-31 20:06

    You can prepend @ to calls in the makefile targets.

    E.g.:

    %.o: %.c
        @$(CC) $(CFLAGS) -c -o $@ $<
        @echo "CC $<"
    

提交回复
热议问题