[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] build system: fix parallel building issue
From: Michael Olbrich <m.olbrich () pengutronix ! de>
Date: 2018-03-28 22:26:45
Message-ID: 20180328222645.ijvq3caalyvqq6yu () pengutronix ! de
[Download RAW message or body]
On Wed, Mar 28, 2018 at 11:13:56PM +0200, Denys Vlasenko wrote:
> On Mon, Mar 19, 2018 at 4:37 PM, Michael Olbrich
> <m.olbrich@pengutronix.de> wrote:
> > The files generated by the include/config/MARKER target are in the
> > dependency list for applets/applet_tables.
> > If applets/applet_tables is created first during applets_dir then it will
> > be created again later as part of $(busybox-dirs).
> > As a result include/applet_tables.h is created again. This time while other
> > build commands may need it.
> >
> > Change the dependency for include/applet_tables.h and include/NUM_APPLETS.h
> > on applets/applet_tables into a existence-only dependency. This way the
> > header files are not recreated even if applets/applet_tables is rebuilt.
> >
> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> > ---
> > applets/Kbuild.src | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/applets/Kbuild.src b/applets/Kbuild.src
> > index 3aedbbffef82..bf6014b92c5b 100644
> > --- a/applets/Kbuild.src
> > +++ b/applets/Kbuild.src
> > @@ -40,7 +40,7 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
> > quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
> > cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
> >
> > -include/NUM_APPLETS.h: applets/applet_tables
> > +include/NUM_APPLETS.h: | applets/applet_tables
> > $(call cmd,gen_applet_tables)
> >
> > # In fact, include/applet_tables.h depends only on applets/applet_tables,
> > @@ -53,5 +53,5 @@ include/NUM_APPLETS.h: applets/applet_tables
> > # The alternative is to not list any command,
> > # and then if include/applet_tables.h is deleted, it won't be rebuilt.
> > #
> > -include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
> > +include/applet_tables.h: include/NUM_APPLETS.h | applets/applet_tables
> > $(call cmd,gen_applet_tables)
> > --
> > 2.16.1
>
>
> Now if you enable one additional applet, NUM_APPLETS.h is not regenerated...
Right. So we could introduce an artificial dependency to ensure that
include/config/MARKER comes first, but seems pretty fragile to me.
Is there a way to not rebuilt applet_tables when applets/ is built the
second time via $(busybox-dirs)? Maybe this in the top-level Makefile:
applets:
@:
But I'm not sure if I'm missing some magic.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic