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 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
--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
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 android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/1131b0a7-0656-4813-9226-c233f3c2a05c%40googlegroups.com.
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 <fredinf...@gmail.com> 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 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
Collabora ltd.
Principal Engineer
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
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 android-...@googlegroups.com.
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 android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/8627b939-8c30-49fa-86cf-32c142de15c7%40googlegroups.com.