Re: [dev] Automatic C header dependency tracking for the redo build-system

From: Sergey Matveev <stargrave_AT_stargrave.org>
Date: Tue, 7 Sep 2021 22:00:13 +0300

Greetings!

*** Thomas Oltmann [2021-09-07 19:50]:
>This tool is able to parse the dependency-only Makefiles that modern C
>compilers can
>produce during compilation, and feed these dependencies into redo (via
>'redo-ifchange').

Just out of curiosity, why POSIX shell abilities are not enough for that task?

    read D < "$2".d
    redo-ifchange ${D#* }

POSIX "read" out-of-box understands \-newlines that can appear in those
.d-Makefiles and read the whole .d file as a single line, where you just
have to strip the first word ("target:").

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF
Received on Tue Sep 07 2021 - 21:00:13 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 07 2021 - 21:48:08 CEST