From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Roland Hieber Date: Thu, 14 Jan 2021 23:51:49 +0100 Message-Id: <20210114225149.3181-2-rhi@pengutronix.de> In-Reply-To: <20210114225149.3181-1-rhi@pengutronix.de> References: <20210114225149.3181-1-rhi@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [RFC 2/2] ptxd_lib_dgen: recompile when certain global kconfig options change List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Roland Hieber There are certain variables in the menu which influence the build environment for all packages: * enabling dev packages * enabling debug packages * changing the reproducible date (only influences target packages) * (probably more, but this is all which I could come up with right now) Add those settings to the respective package hashes, so the hash changes when those variables are changed, and the respective packages are rebuilt. Signed-off-by: Roland Hieber --- A similar case exists for GLOBAL_IPV6_OPTION, but it only affects the packages that are using it, and not the whole userspace. --- scripts/lib/ptxd_lib_dgen.awk | 22 ++++++++++++++++++++++ scripts/lib/ptxd_make_pkghash.awk | 13 +++++++++++++ 2 files changed, 35 insertions(+) diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index 17748111b5ea..2fe358a6825e 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -202,6 +202,28 @@ $1 ~ /^PTX_MAP_._SOURCE/ { # # parse the ptx- and platformconfig +# +$1 ~ /^PTXCONF_PROJECT_CREATE_DEVPKGS/ { + if (PTXDIST_OLD_MAKE) + print "VAR: " $0 >> PTXDIST_HASHLIST; + else { + print "ifdef PTXDIST_SETUP_ONCE" > DGEN_DEPS_POST; + print "$(file >>" PTXDIST_HASHLIST ",VAR: " $1 "=$(" $1 "))" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + } +} + +$1 ~ /^PTXCONF_(DEBUG_PACKAGES|REPRODUCIBLE_TIMESTAMP)/ { + if (PTXDIST_OLD_MAKE) + print "TARGETVAR: " $0 >> PTXDIST_HASHLIST; + else { + print "ifdef PTXDIST_SETUP_ONCE" > DGEN_DEPS_POST; + print "$(file >>" PTXDIST_HASHLIST ",TARGETVAR: " $1 "=$(" $1 "))" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + } +} + +# # record yes and module packages # $1 ~ /^PTXCONF_/ { diff --git a/scripts/lib/ptxd_make_pkghash.awk b/scripts/lib/ptxd_make_pkghash.awk index 2ecae47b48f5..461bb152318c 100755 --- a/scripts/lib/ptxd_make_pkghash.awk +++ b/scripts/lib/ptxd_make_pkghash.awk @@ -9,6 +9,8 @@ BEGIN { PTXDIST_TEMPDIR = ENVIRON["PTXDIST_TEMPDIR"]; dirs = "" + vars = "" + targetvars = "" } $1 == "PATCHES:" { @@ -30,6 +32,14 @@ $1 == "RULES:" { rules[pkg] = rules[pkg] " " rule } +$1 == "VAR:" { + vars = $2 " " vars +} + +$1 == "TARGETVAR:" { + targetvars = $2 " " targetvars +} + function dump_file(src, dst, tmp) { if (!src) return @@ -46,6 +56,9 @@ function dump_file(src, dst, tmp) { END { for (pkg in rules) { f1 = PTXDIST_TEMPDIR "/pkghash-" pkg + printf vars "\n" >> f1 + if ( pkg !~ /^HOST_/ ) + printf targetvars "\n" >> f1 n = split(rules[pkg], cfgs) for (rule = 1; rule <= n; rule++) { dump_file(cfgs[rule], f1) -- 2.30.0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de