From 7b42f8fc76d78fe9c6b0cbe15e1425f2fd9fb5e8 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 21 Nov 2018 10:11:01 +0000 Subject: Tweaks to build process for embedded scripts - Force a rebuild if a script in applets_sh is changed. - Move the dummy usage messages for custom applets to usage.h and change the name from 'dummy' to 'scripted'. - Hide an error from gen_build_files.sh if an embed directory exists but is empty. - Tidy up embedded_scripts script. v2: Remove a couple of unnecessary tests in embedded_scripts, as pointed out by Xabier Oneca. Drop the stripping of comments. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- scripts/embedded_scripts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'scripts/embedded_scripts') diff --git a/scripts/embedded_scripts b/scripts/embedded_scripts index c2e7c69..86ad44d 100755 --- a/scripts/embedded_scripts +++ b/scripts/embedded_scripts @@ -81,21 +81,15 @@ exec >"$target.$$" if [ $n -ne 0 ] then printf '#ifdef DEFINE_SCRIPT_DATA\n' - if [ $n -ne 0 ] - then - printf 'const uint16_t applet_numbers[] = {\n' - for i in $custom_scripts $applet_scripts - do - # TODO support applets with names including invalid characters - printf '\tAPPLET_NO_%s,\n' $i - done - printf '};\n' - fi + printf 'const uint16_t applet_numbers[] = {\n' + for i in $custom_scripts $applet_scripts + do + # TODO support applets with names including invalid characters + printf '\tAPPLET_NO_%s,\n' $i + done + printf '};\n' printf '#else\n' - if [ $n -ne 0 ] - then - printf 'extern const uint16_t applet_numbers[];\n' - fi + printf 'extern const uint16_t applet_numbers[];\n' printf '#endif\n' fi -- cgit v1.1