makefile之调试信息

makefile 调试

转自: https://blog.csdn.net/wachm/article/details/79371371

Makefile常用调试方法

https://www.cnblogs.com/AP0904225/p/5936465.html

 

1. 添加调试信息

执行到error时会中断,warning不中断makefile的执行, info不打印当前makefile名和行号。

a.$(warning "some text") --- warning 不中断makefile的执行,打印warning中的信息,并打印当前makefile文件名和行号。

b.$(info "some text") --- info 打印 "some text"。

c.$(error TEXT…) ---包含warning的功能,同时会中断makefile的执行并退出。


$(warning "this is warning log")
$(info "this is info log")
$(error "this is error log")
all:
    gcc debug.c -o debug

源码路径:https://github.com/suonikeyinsuxiao/trunk/tree/master/makefile_project/debug/debug1

image

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值