How to debug make: tips for debugging makefiles

The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them.

ADVERTISEMENTS

To prepare to use make, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file.

Sometime makefiles become so large, you need to debug them.

This article helps you to get make to work for you, not against you i.e. debugging make and its makefiles.

From the article:
Make and utilities like it are fundamental tools for streamlining the application build process. Learn the structure of the makefile, how to avoid common mistakes in its creation, and how to solve or work around portability issues and other problems as they crop up.

Most UNIX and Linux programs are built by running make. The make utility reads a file (generally named either “makefile” or “Makefile,” but hereafter merely referred to as “a makefile”) that contains instructions and performs various actions to build a program. In many build processes, the makefile is itself generated entirely by other software; for instance, the autoconf/automake programs are used to develop build routines. Other programs may ask you to directly edit a makefile, and of course, new development may require you to write one.

Read more at IBM developerworks [ibm.com]

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • Dems Jun 30, 2011 @ 12:23

    please help me …how to make a program on debug?

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.