Hi Kinsey, On Thu, Mar 4, 2021 at 9:32 AM Kinsey Moore <kinsey.mo...@oarcorp.com> wrote: > > Currently, I’m using it to perform automated u-boot packaging of all the test > executables in my development branch and CI versus having to manually > generate these images or managing external scripts to do the automated > packaging. I'm on the fence as to whether I submit that portion for merging > since it adds extra dependencies on the u-boot tools and doesn't/can't build > images for non-test applications. I thought this might be useful to have in > the public repo but if not that's fine, too. >
This sounds a lot like the old bsp-post-link target we had. Has that gone away in the new build system, and is this a suggestion to replace it? As a side note, I don't intend to ask questions to discourage merging, I just want clarification and often the historical reasons to include things are important later on for others who want to dig back to figure out why something exists. > Kinsey > > -----Original Message----- > From: Gedare Bloom <ged...@rtems.org> > Sent: Thursday, March 4, 2021 10:25 > To: Kinsey Moore <kinsey.mo...@oarcorp.com> > Cc: devel@rtems.org > Subject: Re: [PATCH] wscript: Add post-build processing support > > Can you explain this a bit more? What is the need this solves, and how > will it be used? > > On Thu, Mar 4, 2021 at 9:18 AM Kinsey Moore <kinsey.mo...@oarcorp.com> wrote: > > > > This allows packaging of the compiled binaries to occur automatically > > and be bundled with other scripts and build items as convenient. > > --- > > wscript | 22 ++++++++++++++++++++++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/wscript b/wscript > > index 6626fafb74..e263681716 100755 > > --- a/wscript > > +++ b/wscript > > @@ -223,6 +223,12 @@ class Item(object): > > p.build(bld, bic) > > self.do_build(bld, bic) > > > > + def post_build(self, bld, bic): > > + if _is_enabled(bld.env.ENABLE, self.get_enabled_by()): > > + for p in self.links(): > > + p.post_build(bld, bic) > > + self.do_post_build(bld, bic) > > + > > def do_defaults(self, variant): > > return > > > > @@ -238,6 +244,9 @@ class Item(object): > > def do_build(self, bld, bic): > > return > > > > + def do_post_build(self, bld, bic): > > + return > > + > > def substitute(self, ctx, value): > > if isinstance(value, str): > > try: > > @@ -1074,6 +1083,15 @@ class ScriptItem(Item): > > if script: > > exec(script) > > > > + def do_post_build(self, bld, bic): > > + script = False > > + try: > > + script = self.data["do-post-build"] > > + except KeyError: > > + pass > > + if script: > > + exec(script) > > + > > > > class ConfigItemContext(object): > > def __init__(self, cp, path_list): > > @@ -1485,6 +1503,10 @@ def build(bld): > > bsps[bld.env.ARCH][bld.env.BSP_BASE].build(bld, bic) > > items[bld.env.TOPGROUP].build(bld, bic) > > > > + def post_build(bld): > > + bsps[bld.env.ARCH][bld.env.BSP_BASE].post_build(bld, bic) > > + bld.add_post_fun(post_build) > > + > > > > def add_log_filter(name): > > msg = "'" + name + "' finished successfully" > > -- > > 2.20.1 > > > > _______________________________________________ > > devel mailing list > > devel@rtems.org > > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel