summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordir <dir@ableton.com>2018-01-02 17:11:57 (GMT)
committerdir <dir@ableton.com>2018-08-13 15:54:03 (GMT)
commit892990aa9b75b92bb7e6703a14d5aa45c43c5f34 (patch)
tree24db611843c9b5152d4f2f302f9b1c9bef6e626e
parente9a80817647b5ac556519822251abd0346b6d468 (diff)
Add post build action
@upstream
-rw-r--r--docs/customize-rootfs.txt6
-rw-r--r--target/Makefile6
-rw-r--r--target/config/Config.in.adk4
3 files changed, 16 insertions, 0 deletions
diff --git a/docs/customize-rootfs.txt b/docs/customize-rootfs.txt
index 3518d15..54846db 100644
--- a/docs/customize-rootfs.txt
+++ b/docs/customize-rootfs.txt
@@ -21,3 +21,9 @@ You can also point to another directory via:
You can start with the example configuration files from +root_*+.
The +extra+ directory will never be deleted by any clean target to avoid
loss of customized configuration data.
+
+Another option is to configure a post-build action. This is available
+in +Global settings+. It must point to a script relative to the root
+of your openadk working copy. It will be invoked as part of the
++*-imageinstall+ step with $ADK_TOPDIR as first argument. You can use
+it e.g. to modify the +root_*+ filesystem before bundling it.
diff --git a/target/Makefile b/target/Makefile
index 846620d..128d272 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -228,6 +228,12 @@ endif
$(MAKE) -C $(patsubst %-targethelp,%,$@) targethelp
%-imageinstall: %-imageprepare
+ifdef ADK_POST_BUILD_ACTION
+ifneq ($(ADK_POST_BUILD_ACTION),"")
+ @printf "running post build action '$(ADK_POST_BUILD_ACTION)'\n"
+ $(ADK_TOPDIR)/$(ADK_POST_BUILD_ACTION) $(ADK_TOPDIR)
+endif
+endif
$(MAKE) -C $(patsubst %-imageinstall,%,$@) imageinstall
@for x in $$(ls $(ADK_TOPDIR)/scripts/postimage/*.sh 2>/dev/null); do \
[[ -x "$$x" ]] && $$x; \
diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk
index b414b70..060ee78 100644
--- a/target/config/Config.in.adk
+++ b/target/config/Config.in.adk
@@ -112,4 +112,8 @@ config ADK_TARGET_PORT
help
Port to use for SSH when running make check.
+config ADK_POST_BUILD_ACTION
+ string "Path to script run post build. Must be relative to ADK_TOPDIR."
+ default ""
+
endmenu