zoukankan      html  css  js  c++  java
  • Makefile 调试

    一、简介

    GNU make 提供了若干可以协助调试的内置函数以及命令行选项。 用来调试makefile 的一个最好方法就是加入调试挂钩以及使用具保护的编程技术,让你能够在事情出错时恢复原状。

     

    二、make调试功能

    1)warning函数:可以放在makefile 中的任何地方,将输出string

    $(warning string)

    2)使make读进makefile并且输出它更新工作目标时将会执行的命令,不会真的执行,但在立即的语境中,它会对shell函数调用进行求值动作

    --just-print(-n)

     

    3)运行makefile,显示GNU版权信息以及make 执行的命令,然后依种类输出它的内部数据库,包括:

    --print-data-base (-p)

    4)使make 在未定义的变量被扩展时显示警告信息

    --warn-undefined-variables
    提示:许多内置规则都会包含未定义的变量以作为用户自定义值的挂钩。所以使用这个选项来运行make必然会产生许多不是错误的警告

    5)--debug 选项,有五个调试级别和一个修饰符可用,分别是:

    basic、verbose、implicit、jobs、all 以及makefile
    提示:如果调试选项被指定成--debug,就是在进行basic 调试;如果调试选项被指定成-d,就是在进行all调试;如果要使用选项的其他组合,则可以使用--debug=option1,option2,列表以逗号分隔

    三、make调试工具:remake

    remake is a patched and modernized version of GNU make utility that adds improved error reporting, the ability to trace execution in a comprehensible way, and a debugger. 
    The debugger lets you set breakpoints on targets, show and set variables in expanded or unexpanded form, inspect target descriptions, see the target call stack, and even execute arbitrary GNU make fragments (e.g. add a dependency to an existing target).

    下载

    安装

    rpm -ivh remake-3.82+dbg0.9-1.el6.rf.x86_64.rpm
  • 相关阅读:
    验证码缓存问题完美解决方案
    最近项目是跟框架有关的两个问题
    未与信任 SQL Server 连接相关联
    Get请求
    Post请求
    jQuery操作元素
    Dom对象和jQuery包装集
    XMLHttpRequest对象
    jQuery事件与事件对象
    处理数据集
  • 原文地址:https://www.cnblogs.com/274914765qq/p/4827593.html
Copyright © 2011-2022 走看看