From: Yann E. MORIN" Date: Sat, 3 Mar 2012 23:09:19 +0000 (+0100) Subject: configure: allow $ in package name X-Git-Tag: v3.3.0-0~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6fa3b210e4feb8f4bfa5f179a39a19b5e7a1e5a4;p=kconfig-frontends configure: allow $ in package name The package-name can contain the names of symbols, like '$FOO', which get replaced by their actual value just after parse-time. Signed-off-by: "Yann E. MORIN" --- diff --git a/configure.ac b/configure.ac index d7f0a2f..ce3393f 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,13 @@ AC_ARG_ENABLE( ["$enableval"], [yes], [package_name=$PACKAGE_NAME], [no], [package_name=], - [package_name=$enableval])]) + [# 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}]) AC_ARG_ENABLE( diff --git a/libs/parser/Makefile.am b/libs/parser/Makefile.am index a3862be..c6f68cc 100644 --- a/libs/parser/Makefile.am +++ b/libs/parser/Makefile.am @@ -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 = -DPACKAGE="\"$(package_name)\"" \ -DCONFIG_=\"$(config_prefix)\" libkconfigparser_la_LDFLAGS = -release $(KCONFIGPARSER_LIB_VERSION)