On Thu, Sep 26, 2002 at 04:07:59PM +0000, Soren A wrote:
# Hello!
# 
# I came across a WWW site that claimed this:
# 
# GLIB_CFLAGS=`pkg-config --cflags glib-2.0`
# GLIB_LIBS=`pkg-config --libs glib-2.0`
# FOOBAR_OBJS =
# #...
# .PHONY: foobar.exe
# foobar.exe : $(FOOBAR_OBJS)
#          @echo $@ $(FOOBAR_OBJS) $(GLIB_LIBS)
# 
# and I couldn't believe it, so I tried it. It works.

What is surprising? The backticks are part of the variable's value and
then get substituted. The echo passed to shell is

  echo foobar.exe `pkg-config --cflags glib-2.0`

and then expanded by the shell. You can see this if you drop the @
from @echo and let make announce what it is about to execute.

Regards,

        Jens
-- 
Jens Schweikhardt  http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to