bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make app and right text output with echo


From: Paul Smith
Subject: Re: GNU Make app and right text output with echo
Date: Sat, 19 Feb 2022 10:48:04 -0500
User-agent: Evolution 3.42.4 (by Flathub.org))

On Sat, 2022-02-19 at 17:40 +0200, Eli Zaretskii wrote:
> > From: <filip-vps@seznam.cz>
> > Date: Sat, 19 Feb 2022 14:25:47 +0100 (CET)
> > 
> > Problem is wisible on follow example of file Makefile.win:
> > 
> > all : 
> >       echo $(pkg-config --libs glib-2.0)
> 
> This is wrong, you want
> 
> all : 
>         echo $(shell pkg-config --libs glib-2.0)
> 
> The 'shell' function is missing.

For questions like this you probably want the help-make@gnu.org mailing
list FYI.

I think the best solution is to escape the "$" so it's passed to the
shell rather than interpreted by make; using the shell function in
recipes is to be discouraged IMO.

So use:

  all : 
         echo $$(pkg-config --libs glib-2.0)

This of course assumes that all other aspects of this system are set up
correctly: running POSIX operations like this on a Windows system
typically requires a lot of other configuration.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]