[PATCH] fix overquoting of $(XKBCONFIGROOT)

Dan Nicholson dbn.lists at gmail.com
Thu Mar 24 06:13:29 PDT 2011


On Wed, Mar 23, 2011 at 8:29 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Fixes: http://bugs.gentoo.org/show_bug.cgi?id=360227
>
> Problem is easily seen during compile:
>        -DDFLT_XKB_CONFIG_ROOT='""/usr/share/X11/xkb""'
> ---
>  src/xkbcomp/Makefile.am |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/xkbcomp/Makefile.am b/src/xkbcomp/Makefile.am
> index db54c55..84e5381 100644
> --- a/src/xkbcomp/Makefile.am
> +++ b/src/xkbcomp/Makefile.am
> @@ -1,6 +1,6 @@
>  AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
>  AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) \
> -       -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"'
> +       -DDFLT_XKB_CONFIG_ROOT='$(XKBCONFIGROOT)'
>
>  noinst_LTLIBRARIES = libxkbcomp.la
>  libxkbcomp_la_SOURCES = \

This seems to break the normal configuration where pkg-config gives us
the string unquoted.

$ grep ^XKBCONFIGROOT src/xkbcomp/Makefile
XKBCONFIGROOT = /opt/gfx/share/X11/xkb

No quotes around the string. Building with this patch and V=1 results in:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../src
-I../../include -I../../src -I/opt/gfx/include -Wall -Wpointer-arith
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fno-strict-aliasing -Wbad-function-cast -Wformat=2
-Wold-style-definition -Wdeclaration-after-statement
-DDFLT_XKB_CONFIG_ROOT=/opt/gfx/share/X11/xkb -g -O2
-fvisibility=hidden -MT listing.lo -MD -MP -MF .deps/listing.Tpo -c
listing.c  -fPIC -DPIC -o .libs/listing.o
listing.c: In function ‘xkb_list_components’:
listing.c:494: error: expected expression before ‘/’ token
listing.c:494: error: too few arguments to function ‘GenerateComponent’
listing.c:498: error: expected expression before ‘/’ token
listing.c:498: error: too few arguments to function ‘GenerateComponent’
listing.c:502: error: expected expression before ‘/’ token
listing.c:502: error: too few arguments to function ‘GenerateComponent’
listing.c:506: error: expected expression before ‘/’ token
listing.c:506: error: too few arguments to function ‘GenerateComponent’
listing.c:510: error: expected expression before ‘/’ token
listing.c:510: error: too few arguments to function ‘GenerateComponent’
listing.c:514: error: expected expression before ‘/’ token
listing.c:514: error: too few arguments to function ‘GenerateComponent’
make: *** [listing.lo] Error 1

I think you need to change it to

diff --git a/src/xkbcomp/Makefile.am b/src/xkbcomp/Makefile.am
index db54c55..9c27248 100644
--- a/src/xkbcomp/Makefile.am
+++ b/src/xkbcomp/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
 AM_CFLAGS = $(X11_CFLAGS) $(CWARNFLAGS) \
-       -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"'
+       -DDFLT_XKB_CONFIG_ROOT=\"$(XKBCONFIGROOT)\"

 noinst_LTLIBRARIES = libxkbcomp.la
 libxkbcomp_la_SOURCES = \

--
Dan


More information about the xorg-devel mailing list