• Uncategorized

About linux : Using-command-substituition-in-Makefiles

Question Detail

In the Linux sh/bash shell, I can get Linux user ID with UID_CODE=$(id -u):$(id -g). It usually gives UID_CODE=1000:1000

However, I’m writing a Makefile, similar to this:

run:
UID_CODE=$(id -u):$(id -g) ./a.out

The Makefile gives UID_CODE=: which is just the :

I did some digging and found I need to use $$, but $$(id -u):$$(id -g) gives me UID_CODE=$(id -u):$(id -g)

How do I get the same result as in the shell?

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.