David Boyce uses a shell  approach with his MSHELL

    https://github.com/boyski/mdsh

My team  also used this approach, long ago, to pack build output into XML
that enhanced its parsability and although this one is far more complicated
than you need it might still have something useful in it:

    https://github.com/tnmurphy/raptor/tree/master/util/talon

The bit that could possibly be of use is in

    https://github.com/tnmurphy/raptor/blob/master/util/talon/process.c

...where the run_process function runs whatever the command is and buffers
the output - one could potentially run over this buffer  and format it or
insert control codes before dumping it to the terminal,

In our case we made the output structured (XML) and then were able as an
after-effect to run tools that filtered, searched or colourised that output
and those tools became a lot easier to write.

You could of course "just" take that approach:  make |& myfilter
Then "myfilter" would have to have some clever regexps.

Regards,

Tim


On Mon, 12 Oct 2026 at 15:35, Ivan Sandovin via Users list for the GNU
implementation of make <[email protected]> wrote:

> On 10/12/26 16:30, Paul Smith wrote:
>
> > There is no way to do that.
> >
> > However you can do something probably even better, such as reset the
> > make SHELL variable to invoke your pretty-printer facility, which would
> > then invoke the shell and manage the output for pretty-printing:
> >
> >    SHELL := pretty-print $(SHELL)
> >
> > for example.
>
> Well, it kinda works, yeah, if you print it to stderr or stream the
> caught into some gui app maybe to explore.
> With a simple wrapper shell. I just tried it:
>
> $ make libplast.so
> Executing:pkg-config --cflags cairo
> Executing:pkg-config --cflags x11
> Executing:pkg-config --libs   cairo
> Executing:pkg-config --libs   x11
> clang -fPIC
> -I/gnu/store/nwmbm2shx5b802qkg5rprwrgpgahg5rk-cairo-1.18.4/include/cairo
> -I/gnu/store/xm3nf1yqvyqbnyl96hrwpgcs46x9ncc9-fontconfig-minimal-2.17.1/include
>
> -I/g
> nu/store/iy5mr27rgi7a6xccqyy1c1bd1qzl45f0-expat-2.7.1/include
> -I/gnu/store/dzzmymi0fi5abxwcgb3mklv5yjap8p3r-freetype-2.13.3/include/freetype2
>
> -I/gnu/store/d0z2k2wfx5bppl
> 5ilplwsaj5d3bdcc41-libpng-1.6.39/include/libpng16
> -I/gnu/store/2jzflb96n50lknzn7znfq9ri4qlbifjc-zlib-1.3.1/include
> -I/gnu/store/18arfnhyzwyz3hi8d20x5y3d4mi97n9g-libxext-...
> Executing:clang -fPIC
> -I/gnu/store/nwmbm2shx5b802qkg5rprwrgpgahg5rk-cairo-1.18.4/include/cairo
> -I/gnu/store/xm3nf1yqvyqbnyl96hrwpgcs46x9ncc9-fontconfig-minimal-2.17
> .1/include
> -I/gnu/store/iy5mr27rgi7a6xccqyy1c1bd1qzl45f0-expat-2.7.1/include
> -I/gnu/store/dzzmymi0fi5abxwcgb3mklv5yjap8p3r-freetype-2.13.3/include/freetype2
>
> -I/gnu/store
> /d0z2k2wfx5bppl5ilplwsaj5d3bdcc41-libpng-1.6.39/include/libpng16
> -I/gnu/store/2jzflb96n50lknzn7znfq9ri4qlbifjc-zlib-1.3.1/include
> -I/gnu/store/18arfnhyzwyz3hi8d20x5y3d4m
> i97n9g-libxext-...
>
> But isn't it a little bit cumbersome when you don't want every subshell
> to be spilled?
>
> I might extend gnu make itself I guess instead, to add a hook like that
> then.
> So it'll be loaded as a shared library for speed an convenience.
>
> And add such capability perhaps into existing 'load
> <pretty-printer.so>(...)' extensions mechanism.
> WDYT?
>
  • pretty pri... Ivan Sandovin via Users list for the GNU implementation of make
    • Re: p... Simon Richter
    • Re: p... Paul Smith
      • R... Ivan Sandovin via Users list for the GNU implementation of make
        • ... Tim Murphy

Reply via email to