> is the answer to do this in multiple passes with different sets of macros?

Other possibilities:

1. A single output stream interspersed with diversion tags to be
postprocessed by, say, an awk script to distribute it to the
several files.

2. Use syscmd to deliver fragments to files: "echo stuff >>file".
To avoid creating hundreds of processes, "stuff" could be gathered
in diversions. (This approach is baroque, but it does get the
whole job described in a single program.)

[I once described a macroprocessor as a "switchyard for data streams".
Odd, isn't it, that top-level switching is not included among m4's long
list of features.]

Doug

Reply via email to