Skip to content

Commit a95fa13

Browse files
committed
[config] Fix string entry in make menuconfig
1 parent 725479c commit a95fa13

File tree

8 files changed

+43
-17
lines changed

8 files changed

+43
-17
lines changed

8018x.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ CONFIG_APP_BASIC=y
161161
# CONFIG_APP_TEST is not set
162162
CONFIG_APP_KTCP=y
163163
# CONFIG_APP_MAN_PAGES is not set
164-
CONFIG_APP_ROM_TAGS=":ash|:128k|:192k|"
164+
CONFIG_APP_TAGS=":ash|:128k|:192k|"
165165

166166
#
167167
# Target image

config/Configure

+7-2
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,13 @@ function hex () {
533533
# define_string define value
534534

535535
function define_string () {
536-
echo "$1=\"$2\"" >>$CONFIG
537-
echo "#define $1 \"$2\"" >>$CFG_H
536+
if [ "$2" != "" ]; then
537+
echo "$1=\"$2\"" >>$CONFIG
538+
echo "#define $1 \"$2\"" >>$CFG_H
539+
else
540+
#echo "# $1 is not set" >>$CONFIG
541+
echo "#undef $1" >>$CFG_H
542+
fi
538543
eval "$1=\"$2\""
539544
}
540545

config/Menuconfig

+29-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# script.
2121
#
2222
# William Roadcap was the original author of Menuconfig.
23-
# Jody Bruchon ([email protected]) is the current maintainer.
23+
# Michael Elizabeth Chastain ([email protected]) is the current maintainer.
2424
#
2525
# 07 Apr 1997 Bernhard Kaindl <[email protected]>
2626
# - get default values for new bool, tristate and dep_tristate
@@ -305,6 +305,12 @@ function hex () {
305305
# Add a menu item which will call our local string function.
306306

307307
function string () {
308+
set_x_info "$2" "$3"
309+
echo -ne "'$2' '[$x] $1$info' " >>MCmenu
310+
echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists
311+
}
312+
313+
function string_broken () {
308314
set_x_info "$2" "$3"
309315
echo -ne "'$2' ' $1: \"$x\"$info' " >>MCmenu
310316
echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists
@@ -641,6 +647,21 @@ function l_hex_broken () {
641647
# Create a dialog for entering a string into a kernel option.
642648

643649
function l_string () {
650+
while true ; do
651+
if $DIALOG --title "$1" --backtitle "$backtitle" \
652+
--inputbox "$inputbox_instructions_string" \
653+
10 75 "$4" 2>MCdialog.out
654+
then
655+
answer="`cat MCdialog.out`"
656+
answer="${answer:-$3}"
657+
eval $2='${answer}'
658+
break
659+
fi
660+
help "$2" "$1"
661+
done
662+
}
663+
664+
function l_string_broken () {
644665
while true ; do
645666
if $DIALOG --title "$1" --inputbox "$inputbox_instructions_string" \
646667
--backtitle "$backtitle" 10 75 "$4" 2>MCdialog.out
@@ -1108,8 +1129,13 @@ save_configuration () {
11081129

11091130
function string () {
11101131
set_x_info "$2" "$3"
1111-
echo "$2=\"$x\"" >> $CONFIG
1112-
echo "#define $2 \"$x\"" >> $CFG_H
1132+
if [ "$x" != "" ]; then
1133+
echo "$2=\"$x\"" >> $CONFIG
1134+
echo "#define $2 \"$x\"" >> $CFG_H
1135+
else
1136+
#echo "# $2 is not set" >>$CONFIG
1137+
echo "#undef $2" >>$CFG_H
1138+
fi
11131139
}
11141140

11151141
function define_hex () {

elks/config.in

+1-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ mainmenu_option next_comment
6262
bool 'Boot Options in /bootopts' CONFIG_BOOTOPTS y
6363
bool 'Calculate process CPU usage' CONFIG_CPU_USAGE y
6464
bool 'Real time clock in localtime' CONFIG_TIME_RTC_LOCALTIME n
65-
if [ "$CONFIG_TIME_TZ" != "" ]; then
66-
string 'Compiled-in TZ= timezone string' CONFIG_TIME_TZ "$CONFIG_TIME_TZ"
67-
fi
65+
string 'Compiled-in TZ= timezone string' CONFIG_TIME_TZ ''
6866
bool 'System Trace' CONFIG_STRACE n
6967
bool 'Halt on Idle' CONFIG_IDLE_HALT n
7068

elkscmd/Make.install

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ TAGS=
1919
# Old-style installation
2020
INSTDIRS=
2121

22-
ifdef CONFIG_APP_ROM_TAGS
23-
TAGS += "$(CONFIG_APP_ROM_TAGS)"
22+
ifdef CONFIG_APP_TAGS
23+
TAGS += "$(CONFIG_APP_TAGS)"
2424
endif
2525

2626
#

elkscmd/config.in

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ mainmenu_option next_comment
3232
bool 'nano-X' CONFIG_APP_NANOX y
3333
bool 'BASIC' CONFIG_APP_BASIC y
3434
bool 'other' CONFIG_APP_OTHER y
35+
string 'Additional TAG string for app selection' CONFIG_APP_TAGS ''
3536

3637
comment 'Commands not compiling'
3738

@@ -68,10 +69,6 @@ mainmenu_option next_comment
6869
comment 'Man pages'
6970

7071
bool 'Man Pages' CONFIG_APP_MAN_PAGES n
71-
72-
if [ "$CONFIG_ROMCODE" = "y" ]; then
73-
string 'TAG string for ROM apps' CONFIG_APP_ROM_TAGS ""
74-
fi
7572
else
7673
comment "Select Applications by Image Size"
7774

emu86-rom-full.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ CONFIG_PSEUDO_TTY=y
160160
# CONFIG_APP_M4 is not set
161161
# CONFIG_APP_TEST is not set
162162
# CONFIG_APP_KTCP is not set
163-
CONFIG_APP_ROM_TAGS=":ash|:128k|"
163+
CONFIG_APP_TAGS=":ash|:128k|"
164164

165165
#
166166
# Target image

emu86-rom.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ CONFIG_PSEUDO_TTY=y
155155
# CONFIG_APP_M4 is not set
156156
# CONFIG_APP_TEST is not set
157157
# CONFIG_APP_KTCP is not set
158-
CONFIG_APP_ROM_TAGS=":ash|:128k|"
158+
CONFIG_APP_TAGS=":ash|:128k|"
159159

160160
#
161161
# Target image

0 commit comments

Comments
 (0)