What is your pre-build-script.sh script doing? Right now, since it has no dependencies and no output files, you're essentially running it on every build, even when the user is only trying to compile a single file in a different section of the tree. That's deprecated since it has a huge performance impact.
Generally, if this is something that takes inputs and produces output files, you may be able to use a genrule. But without knowing anything about what this script is doing, I can't help much more than that. - Dan On Tue, Aug 20, 2019 at 2:40 PM Frederic Plourde <[email protected]> wrote: > Hi android building ! > > > I used to have this in one of my Android.mk makefiles : > > $(shell (cd $(LOCAL_PATH)/../../ && ./pre-build-script.sh)) > > > but I just noticed that this practice is now discouraged on the Soong > Android.bp build system > > From the Build System Best Practices > <https://android.googlesource.com/platform/build/soong/+/HEAD/docs/best_practices.md> > document, I could read : > > Don't use $(shell) to write files, create symlinks, etc. We expect to > enforce this in the future. Encode these as build rules in the build graph > instead. This can be problematic in a number of ways: > > > Could you give me a concrete example of how I could run this > "pre-build-script.sh" shell script before *every* build in my new > Android.bp file ? > > thx :) > > > *Frederic Plourde* > Principal Engineer > Collabora ltd. > > -- > -- > You received this message because you are subscribed to the "Android > Building" mailing list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-building?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Android Building" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-building/1131b0a7-0656-4813-9226-c233f3c2a05c%40googlegroups.com > <https://groups.google.com/d/msgid/android-building/1131b0a7-0656-4813-9226-c233f3c2a05c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CALQgHdmerW-%2BZ6GeKJKuakgmdLD%3DQLmNPY_EWLVixbm%2BLM117w%40mail.gmail.com.
