[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Undocumented make feature?
From: |
Jens Schweikhardt |
Subject: |
Re: Undocumented make feature? |
Date: |
Fri, 27 Sep 2002 08:58:09 +0200 |
User-agent: |
Mutt/1.2.5i |
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)