]> git.sur5r.net Git - kconfig-frontends/commitdiff
parser: replace package-name by root-menu
authorYann E. MORIN" <yann.morin.1998@free.fr>
Sat, 3 Mar 2012 23:51:00 +0000 (00:51 +0100)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Sat, 3 Mar 2012 23:51:00 +0000 (00:51 +0100)
Rather than simply seting the "package name", allow setting the
complete root-menu prompt.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac
libs/parser/Makefile.am
libs/parser/yconf.y
libs/parser/yconf.y.patch

index ce3393ff98af3312769c25a7e5aa02da3afbb32b..0759574df87ca9c531407b5c1f31841ab9443bd5 100644 (file)
@@ -31,22 +31,22 @@ LT_INIT([disable-static])
 # Although there is a default (="linux") in the code, we do provide
 # a default here, to get a consistent autostuff behavior
 AC_ARG_ENABLE(
-    [package-name],
+    [root-menu-prompt],
     [AS_HELP_STRING(
-        [--enable-package-name],
-        [set the package name (default=kconfig-frontends)])],
+        [--enable-root-menu-prompt],
+        [set the root-menu prompt (default=Configuration)])],
     [AS_CASE(
         ["$enableval"],
-        [yes], [package_name=$PACKAGE_NAME],
-        [no],  [package_name=],
+        [yes], [root_menu=Configuration],
+        [no],  [root_menu=],
                [# Escape the $ signs, otherwise they would get munged by make
                 # Also, append a space at the end, to separate the package
                 # name from the literal 'Configuration'
-                package_name="$( echo "$enableval"          \
-                                 |sed -r -e 's/\$/\\$$/g;'  \
-                                         -e 's/$/ /;'       \
-                               )"])])
-AC_SUBST([package_name], [${package_name=$PACKAGE_NAME}])
+                root_menu="$( echo "$enableval"          \
+                              |sed -r -e 's/\$/\\$$/g;'  \
+                                      -e 's/$/ /;'       \
+                            )"])])
+AC_SUBST([root_menu], [${root_menu=Configuration}])
 
 AC_ARG_ENABLE(
     [config-prefix],
@@ -347,8 +347,8 @@ AC_OUTPUT
 
 AC_MSG_NOTICE()
 AC_MSG_NOTICE([Configured with:])
-AC_MSG_NOTICE([- package name: '$package_name'])
-AC_MSG_NOTICE([- config prefix: '$config_prefix'])
+AC_MSG_NOTICE([- root-menu prompt: '$root_menu'])
+AC_MSG_NOTICE([- config prefix:    '$config_prefix'])
 AC_MSG_NOTICE([- frontends:])
 AS_IF([test "$enable_conf" = "yes"],
       [AC_MSG_NOTICE([  - conf:  yes])],
index c6f68cc3ec20c361610f532672a68300a1953e92..afad350a13c72ca4dcc56315ac703d040c0c6321 100644 (file)
@@ -6,7 +6,7 @@ dist_EXTRA_libkconfigparser_la_SOURCES =  \
     hconf.gperf lconf.l                   \
     confdata.c menu.c symbol.c util.c     \
     expr.c expr.h lkc.h lkc_proto.h
-libkconfigparser_la_CPPFLAGS = -DPACKAGE="\"$(package_name)\""  \
+libkconfigparser_la_CPPFLAGS = -DROOTMENU="\"$(root_menu)\""    \
                                -DCONFIG_=\"$(config_prefix)\"
 libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)
 
index 932be3d8193e04122dc0b9e1b7651e93ced4b816..093ec1ac2796c6d93aa3ee1473f2b8ab0369558b 100644 (file)
@@ -496,7 +496,7 @@ void conf_parse(const char *name)
        modules_sym = sym_lookup(NULL, 0);
        modules_sym->type = S_BOOLEAN;
        modules_sym->flags |= SYMBOL_AUTO;
-       rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE "Configuration", NULL);
+       rootmenu.prompt = menu_add_prompt(P_MENU, ROOTMENU, NULL);
 
        if (getenv("ZCONF_DEBUG"))
                zconfdebug = 1;
index 12ea49d15be480421cf3a503bad0698588ae124a..dc8f0e928f4795d64a894a47cd98e6071d575935 100644 (file)
@@ -14,7 +14,7 @@
        modules_sym->type = S_BOOLEAN;
        modules_sym->flags |= SYMBOL_AUTO;
 -      rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
-+      rootmenu.prompt = menu_add_prompt(P_MENU, PACKAGE "Configuration", NULL);
++      rootmenu.prompt = menu_add_prompt(P_MENU, ROOTMENU, NULL);
  
        if (getenv("ZCONF_DEBUG"))
                zconfdebug = 1;