From 7ccb78414ddf48eeafcc6bc7ff4c6640d1ff2a64 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 5 Jun 2013 17:21:32 +0000 Subject: Remove empty radio/single/group/multi options from lists This can happen due to slave/exclude --- Mk/bsd.options.mk | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Mk/bsd.options.mk') diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 7464141a5a60..34fd0845e99d 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -157,6 +157,29 @@ OPTIONS_GROUP_${group}:= ${OPTIONS_GROUP_${group}:N${opt}} . endfor .endfor +# Remove empty SINGLE/GROUP/RADIO/MULTI +# Can be empty because of exclude/slaves +.for single in ${OPTIONS_SINGLE} +.if empty(OPTIONS_SINGLE_${single}) +OPTIONS_SINGLE:= ${OPTIONS_SINGLE:N${single}} +.endif +.endfor +.for radio in ${OPTIONS_RADIO} +.if empty(OPTIONS_RADIO_${radio}) +OPTIONS_RADIO:= ${OPTIONS_RADIO:N${radio}} +.endif +.endfor +.for group in ${OPTIONS_GROUP} +.if empty(OPTIONS_GROUP_${group}) +OPTIONS_GROUP:= ${OPTIONS_GROUP:N${group}} +.endif +.endfor +.for multi in ${OPTIONS_MULTI} +.if empty(OPTIONS_MULTI_${multi}) +OPTIONS_MULTI:= ${OPTIONS_MULTI:N${multi}} +.endif +.endfor + # complete list COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS} .for single in ${OPTIONS_SINGLE} -- cgit v1.2.3