Home Home > GIT Browse
diff options
authorNicolai Stange <nstange@suse.de>2017-06-13 15:51:42 +0200
committermbenes <mbenes@pobox.suse.cz>2017-06-14 10:19:18 +0200
commitba41416b4fcadf4df883a0c1657540f5043cb391 (patch)
parent4e8dc885be228e6db8f3988101e63cdc466b0f1b (diff)
scripts/register-patches.sh: don't add ','s to @@KGR_PATCHES_FUNCS@@
register-patches.sh expands kgr_patch_main.c's @@KGR_PATCHES_FUNCS@@ placeholder by concatenating all available patches' KGR_PATCH_<XY>_FUNCS together, separating them by commas. The KGR_PATCH_<XY>_FUNCS are CPP macros supposed to be provided by each patch. If one of these happens to be empty, the preprocessed expansion will contain two consecutive commas which gcc doesn't like in array initializers. Do not add any commas to the @@KGR_PATCHES_FUNCS@@ expansion but require the individual KGR_PATCH_<XY>_FUNCS macros to already contain trailing ones as needed. Fixes: 4e8dc885be22 ("scripts: create kgr_patch_main.c dynamically") Signed-off-by: Nicolai Stange <nstange@suse.de>
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/register-patches.sh b/scripts/register-patches.sh
index 89cec61..9febd3e 100755
--- a/scripts/register-patches.sh
+++ b/scripts/register-patches.sh
@@ -75,7 +75,7 @@ KGR_PATCHES_FUNCS=$(
echo -n "\t\t/* Auto expanded KGR_PATCHES_FUNCS: */\n"
for p in "${kgr_patches[@]}"; do
p="KGR_PATCH_$(echo $p | tr '[:lower:]' '[:upper:]')_FUNCS"
- echo -n "\t\t${p},\n"
+ echo -n "\t\t${p}\n"
done | sed 's/\\n$//' # rm trailing extra newlines