On 19 Sep 2011, at 23:56, Paul Smith wrote: > The first stage of make is reading in all the makefiles. As part of > this, variables and functions are expanded (one line at a time) and the > result is a string.
Its parser is handwritten, and perhaps not easy to tweak, and get 'make' variables and stuff into Guile. > The $(guile ...) make function, like all other make functions and > variables, is expanded in this way, so the return value of the guile > function must be converted to a string and appended to the string buffer > make is constructing. Once all of the input is expanded and the > expansion is added to the buffer, then make will go back and parse it > (exactly how this is done is very context-dependent). There is the pretty-print module. (use-modules (ice-9 pretty-print)) Perhaps you might check how it is implemented. Hans