Re: [dev] Build system: redo

From: Sergey Matveev <stargrave_AT_stargrave.org>
Date: Wed, 6 Jan 2021 17:57:32 +0300

*** Greg Reagle [2021-01-06 08:52]:
>I know that there are advantages to having the .do files separated, so there is no need to mention that.

But single .do is huge disadvantage. Can not skip mention of that :-)
Each changing of that single .do will expire all targets. Each different
invocation can record completely different dependencies, because various
redo-ifchange commands were called. Basically it is unworkable .do.

>CC=${CC:-cc}

Most of variables like PKG_CONFIG and similar can be written with ${:-}
construct, to be able to override it with environmental variables.

> config.h)
> cp config.def.h "$3"

Can be written just as: cat config.def.h. Just shorter.

> clean)
> redo-always

No need to add redo-always to the targets that only can be "called" by
the human/user. User uses "redo" command, that forces specified targets
to be rebuild. So "redo clean/dst/install/whatever" will always do the
target. redo-always here is completely useless.

> install)

It misses "redo-ifchange st". It will fail if st was not built.

> install)
> exec >&2

Why that exec? There is only one "echo" in that target at the end. It is
better to add redirection to stderr, than to call heavy "exec" for the
whole target.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF
Received on Wed Jan 06 2021 - 15:57:32 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 06 2021 - 16:00:09 CET