Tool for debugging makefiles

前端 未结 6 1206
有刺的猬
有刺的猬 2020-12-12 13:08

I have a large legacy codebase with very complicated makefiles, with lots of variables. Sometimes I need to change them, and I find that it\'s very difficult to figure out

6条回答
  •  再見小時候
    2020-12-12 13:27

    From the man page on make command-line options:

    -n, --just-print, --dry-run, --recon  
    Print the commands that would be executed, but do not execute them.  
    
    -d  Print debugging information in addition to normal processing.  
    The debugging information says  
    which files are being considered for remaking,  
    which file-times are being compared and with what results,  
    which files actually need  to  be  remade,  
    which implicit  rules are considered and which are applied---  
    everything interesting about how make decides what to do.  
    
    --debug[=FLAGS] Print debugging information in addition to normal processing.  
    If the FLAGS are omitted, then the behaviour is the same as if -d was specified.  
    FLAGS may be:  
    'a' for all debugging output same as using -d,  
    'b' for basic debugging,  
    'v' for more verbose basic debugging,  
    'i' for showing implicit rules,  
    'j' for details on invocation of commands, and  
    'm' for debugging while remaking makefiles.  
    

提交回复
热议问题