Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Makefile shell with multiple commands

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

[SOLVED] Makefile shell with multiple commands

#1 Post by shogun1234 »

I have a Makefile (make version 4.3 debian bullseye/sid and kernel 5.6.0-1-rt-amd64) contains

Code: Select all

       $(eval svn := $(shell $(basename which svn)))
        echo $(svn)
which prints following message on console.

Code: Select all

echo /usr/bin/svn
Change to use

Code: Select all

        $(eval svn := $(shell $(basename $(which svn))))
        echo $(svn)
it prints following message on console.

Code: Select all

echo 
However I want to achieve the effect the same as executing command basename `which svn`, which would return svn. How can I achieve this effect?

Thanks
Last edited by shogun1234 on 2021-03-17 08:40, edited 1 time in total.

shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

Re: Makefile shell with multiple commands

#2 Post by shogun1234 »

Ok I think I fix the problem. Change to

Code: Select all

        $(eval svn_bin := $(shell basename $(shell which svn)))
fixes the problem. Thanks

Post Reply