]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Use filter instead of findstring to check for enabled plugins in Android.mk.
authorTobias Brunner <tobias@strongswan.org>
Thu, 16 Feb 2012 17:41:10 +0000 (18:41 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 Aug 2012 13:07:43 +0000 (15:07 +0200)
findstring is not prefix-safe (i.e. android matches android-log). On
the other hand filter matches words separated by whitespace and if no
wildcard (%) is used the full word has to match.

Android.mk.in

index 19048b9e7f4937fce0d909fd46d3ef08462b42ad..2b51d3ea180714cafb795a437a22472419f90b0f 100644 (file)
@@ -34,7 +34,7 @@ strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
 
 # helper macros to only add source files for plugins included in the list above
 # source files are relative to the android.mk that called the macro
-plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
+plugin_enabled = $(filter $(1), $(strongswan_PLUGINS))
 add_plugin = $(if $(call plugin_enabled,$(1)), \
                $(patsubst $(LOCAL_PATH)/%,%, \
                  $(wildcard \