]> git.ipfire.org Git - thirdparty/openwrt.git/commit
tools/automake: control all cleaning with clean variables
authorMichael Pratt <mcpratt@pm.me>
Tue, 8 Oct 2024 10:55:47 +0000 (06:55 -0400)
committerRobert Marko <robimarko@gmail.com>
Sat, 26 Jul 2025 12:38:08 +0000 (14:38 +0200)
commit6d2bfe50d32bcaa53a1dd5012653661b29233dcc
tree59b7516eb360a1b7e93a98162a944bfbb5ab6fcf
parentfddac9af6f03f6a6649e851de09b20e5f5f6c4e2
tools/automake: control all cleaning with clean variables

Automake previously makes rules for the target maintainer-clean
to remove both the contents of MAINTAINERCLEANFILES and BUILT_SOURCES.

In order to have finer control over what is removed,
let there only be a rule for deleting MAINTAINERCLEANFILES,
and set MAINTAINERCLEANFILES to a default value of BUILT_SOURCES
if only conditional or missing, and append BUILT_SOURCES if user-defined.

In order to maintain conditional values for MAINTAINERCLEANFILES
while keeping a default value, change the behavior of automake
to output unconditional definitions before conditions.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
tools/automake/patches/300-output-TRUE-cond-first.patch [new file with mode: 0644]
tools/automake/patches/310-maintainer-clean-built_sources.patch [new file with mode: 0644]