no space after --variable output

Jim Graf exportfs at gmail.com
Wed Dec 30 11:09:00 PST 2009


I use --variable in my builds, but I have a small problem:

with this pc file test.pc:
--------------------------------------------------------------------
prefix=/some/path
libdir=${prefix}/lib
includedir=${prefix}/include
Rpath=-Wl,--rpath -Wl,${prefix}/lib

Name: test
Version: 0
Description: test

Cflags: -I${includedir} \
         -m32 \
        -m32 -DLOGGING=1 -I/blah/blay/blah -I/usr/include/mysql
Libs: -L${libdir} \
        -lmylib\
        -L/spud/spud -lz -lcrypt -lnsl -lm
--------------------------------------------------------------------
pkg-config --version
0.23
/pkg-config --libs --cflags --variable=Rpath test

-Wl,--rpath -Wl,/some/path/lib-m32 -DLOGGING=1 -I/some/path/include
-I/blah/blay/blah -I/usr/include/mysql  -L/some/path/lib -L/spud/spud
-lmylib -lz -lcrypt -lnsl -lm

the -m32 option is concatenated with the Rpath variable. The code in main.c
looks like:
  if (variable_name)
    {
      char *str = packages_get_var (packages, variable_name);
      printf ("%s", str);
      g_free (str);
      need_newline = TRUE;
    }

Why not "%s ", like all of the other stmts? When I change this, it works for
me. I am guessing that there must be something I am not doing right or some
other reason for this, because I can't be the only person using --variable
and having this problem?

thanks,
jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/pkg-config/attachments/20091230/cff9c14a/attachment.htm 


More information about the pkg-config mailing list