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>