| | 25 | |
| | 26 | `$(warning ... message ...)`:: |
| | 27 | equivalent to "printf-debugging` in a C program: this causes |
| | 28 | '''make''' to print a message when it reads the `$(warning ..)` |
| | 29 | expression, and the message can include variable references. Very |
| | 30 | useful for finding out what '''make''' thinks the value of a |
| | 31 | variable is at a particular point in the `Makefile`, or for finding |
| | 32 | out the parameters for a particular macro call. Want to test your hypothesis about what the variable `rts_C_SRCS` contains? Just add a `$(warning $(rts_C_SRCS))` somewhere. |
| | 33 | |
| | 34 | `make show VALUE=VAR`:: |
| | 35 | prints the value of variable `VAR`. Useful for quick diagnosis. |
| | 36 | |
| | 37 | `make TRACE=1`:: |
| | 38 | prints messages about certain macros that are called and their arguments. This is basically a system of `$(warning)` calls enabled when the value of `$(TRACE)` is non-empty. To see how it works, look at the file [[GhcFile(rules/trace.mk)]], and feel free to add trace calls to more places in the build system. |
| 38 | | |
| 39 | | `$(warning ... message ...)`:: |
| 40 | | equivalent to "printf-debugging` in a C program: this causes |
| 41 | | '''make''' to print a message when it reads the `$(warning ..)` |
| 42 | | expression, and the message can include variable references. Very |
| 43 | | useful for finding out what '''make''' thinks the value of a |
| 44 | | variable is at a particular point in the `Makefile`, or for finding |
| 45 | | out the parameters for a particular macro call. |
| 46 | | |
| 47 | | `make show VALUE=VAR`:: |
| 48 | | prints the value of variable `VAR`. Useful for quick diagnosis. |