1 1 12 Portable Make Programming 1 **************************** 1 1 Writing portable makefiles is an art. Since a makefile's commands are 1 executed by the shell, you must consider the shell portability issues 1 already mentioned. However, other issues are specific to `make' itself. 1
1 · $< in Ordinary Make Rules $< in ordinary rules · Failure in Make Rules Failing portably in rules · Special Chars in Names Special Characters in Macro Names · Backslash-Newline-Empty Empty lines after backslash-newline · Backslash-Newline Comments Spanning comments across line boundaries · Long Lines in Makefiles Line length limitations · Macros and Submakes `make macro=value' and submakes · The Make Macro MAKEFLAGS `$(MAKEFLAGS)' portability issues · The Make Macro SHELL `$(SHELL)' portability issues · Parallel Make Parallel `make' quirks · Comments in Make Rules Other problems with Make comments · Newlines in Make Rules Using literal newlines in rules · Comments in Make Macros Other problems with Make comments in macros · Trailing whitespace in Make Macros Macro substitution problems · Command-line Macros and whitespace Whitespace trimming of values · obj/ and Make Don't name a subdirectory `obj' · make -k Status Exit status of `make -k' · VPATH and Make `VPATH' woes · Single Suffix Rules Single suffix rules and separated dependencies · Timestamps and Make Subsecond timestamp resolution 1