Chapter 4. Pitfalls and Problems
In this chapter, you’ll learn how to deal with problems faced by makefile maintainers as projects get considerably larger. Tasks that seem easy with small makefiles become more difficult with large, sometimes recursive, make
processes. As makefiles become more complex, it’s easy to run into problems with edge cases or sometimes poorly understood behavior of GNU make
.
Here you’ll see a complete solution to the “recursive make
problem,” how to overcome GNU make
’s problems handling filenames that contain spaces, how to deal with cross-platform file paths, and more.
GNU make Gotcha: ifndef and ?=
It’s easy to get tripped up by the two ways of checking whether a variable is defined, ifndef
and ?=
, because they do similar ...
Get The GNU Make Book now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.