diff options
Diffstat (limited to 'scripts/lib/ptxd_lib_dgen.awk')
-rw-r--r-- | scripts/lib/ptxd_lib_dgen.awk | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index 37c179839..5be1ddf16 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -243,6 +243,23 @@ END { } # + # conditional dependency on autogen script + # + if (!(this_pkg ~ /^host-|^cross-/)) { + print "ifneq ($(" this_PKG "),)" > DGEN_DEPS_POST; + print "ifneq ($(call autogen_dep,$(" this_PKG ")),)" > DGEN_DEPS_POST; + } else { + target_PKG = gensub(/^HOST_/, "", "", this_PKG); + target_PKG = gensub(/^CROSS_/, "", "", target_PKG); + # host/cross packages inherit the package name xor have their own + print "ifneq ($(" this_PKG ")$(" target_PKG "),)" > DGEN_DEPS_POST; + print "ifneq ($(call autogen_dep,$(" this_PKG ")$(" target_PKG ")),)" > DGEN_DEPS_POST; + } + print "$(STATEDIR)/" this_pkg ".extract: $(STATEDIR)/autogen-tools" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + + # # add dep to pkgs we depend on # this_PKG_DEPS = PKG_to_DEP[this_PKG]; |