ask mr make

[article]

Learning GNU Make Functions with Arithmetic

Summary:

GNU Make has no built-in arithmetic capability. In this article, I present a collection of GNU Make macros that implement functions for addition, subtraction, multiplication, and division of integers. Functions are also provided for integer comparisons such as “greater than” and “not equal.” These macros are implemented entirely using GNU Make's built-in string manipulation functions.

GNU Make has no built-in arithmetic capability. In this article, I present a collection of GNU Make macros that implement functions for addition, subtraction, multiplication, and division of integers. Functions are also provided for integer comparisons such as “greater than” and “not equal.” These macros are implemented entirely using GNU Make's built-in string manipulation functions.

About the author

[article]

Tips and Tricks From the Automatic Dependency Generation Masters

Summary:

Make's dependency syntax is flawed because it incorporates both foo.o must be updated if header.h, system.h or foo.c are changed and foo.o is the result of compiling foo.c.  Thus, anything to the right of the : is a prerequisite, but the first prerequisite where there's a rule body (i.e. commands) is special: it's the prerequisite that will be passed to the compiler (or other command) to actually generate the target.

Make's dependency syntax is flawed because it incorporates both foo.o must be updated if header.h, system.h or foo.c are changed and foo.o is the result of compiling foo.c.  Thus, anything to the right of the : is a prerequisite, but the first prerequisite where there's a rule body (i.e. commands) is special: it's the prerequisite that will be passed to the compiler (or other command) to actually generate the target.

About the author

[article]

The Trouble with Hidden Targets

Summary:

Make programs are very good at keeping track of targets, files that need to be built, and the dependencies between targets. But the Make program is only as good as its inputs. If you don't tell Make about a relationship between two files, it wont discover it on its own and it'll make mistakes because it assumes it has perfect knowledge about the files and their relationships.

Make programs are very good at keeping track of targets, files that need to be built, and the dependencies between targets. But the Make program is only as good as its inputs. If you don't tell Make about a relationship between two files, it wont discover it on its own and it'll make mistakes because it assumes it has perfect knowledge about the files and their relationships.

About the author

[article]

Tracing rule execution in GNU Make

Summary:

Who hasn't wondered what exactly Make's log file output means. This article is about Makefile tracing. I cover tracing the execution of Makefile rules.

Who hasn't wondered what exactly Make's log file output means. This article is about Makefile tracing. I cover tracing the execution of Makefile rules.

About the author

[article]

Adding set operations to GNU Make

Summary:

The new GMSL functions include ways of testing the relationship between sets and determining whether an individual element is in a set.

The new GMSL functions include ways of testing the relationship between sets and determining whether an individual element is in a set.

About the author

[article]

The Basics: VPATH and vpath

Summary:

Ask Mr. Make talks about the uses of VPATH and vpath.

Ask Mr. Make talks about the uses of VPATH and vpath.

About the author

[article]

Learning Make with the Towers of Hanoi

Summary:

The Towers of Hanoi puzzle consists of a small board with three pegs on it. On the left most peg a stack of discs is arranged in descending order of size: the largest disc is on the bottom.

The Towers of Hanoi puzzle consists of a small board with three pegs on it. On the left most peg a stack of discs is arranged in descending order of size: the largest disc is on the bottom.

About the author

[article]

Make Clean: Usman's Law

Summary:

Usman's Law (named after a smart coworker of mine who spent months working with customer Makefiles). make clean is intended to take you back to a state where everything will be rebuilt from scratch.   Often times it doesn't. Here's why.

Usman's Law (named after a smart coworker of mine who spent months working with customer Makefiles). make clean is intended to take you back to a state where everything will be rebuilt from scratch.   Often times it doesn't. Here's why.

About the author

[article]

GNU Make User-Defined Functions

Summary:

Creating GNU Make built-in functions is easy, but it does create a maintenance problem: the next time GNU Make is updated we'll need to port our changes to the new version.

Creating GNU Make built-in functions is easy, but it does create a maintenance problem: the next time GNU Make is updated we'll need to port our changes to the new version.

About the author

[article]

The Pitfalls and Benefits of GNU Make Parallelization

Summary:

Many build processes run for hours with build managers commonly typing 'make' and going home for the night. GNU Make's solution to this problem is parallel execution, which is a simple command-line option that causes GNU Make to run jobs in parallel using the dependency in the Makefile to run in the correct order.

Many build processes run for hours with build managers commonly typing 'make' and going home for the night. GNU Make's solution to this problem is parallel execution, which is a simple command-line option that causes GNU Make to run jobs in parallel using the dependency in the Makefile to run in the correct order.

About the author

Pages

AgileConnection is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.