[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to assign a shell variable in a makefile?
From: |
Peng Yu |
Subject: |
How to assign a shell variable in a makefile? |
Date: |
Sat, 10 Apr 2010 22:07:12 -0500 |
I want assigned the variable something in shell some value and then echo it.
########
.PHONY: all
all:
something=$(shell basename abc.txt .txt)
echo $(something)
echo $$(something)
################
But the above code doesn't work. Would you please let me know what the
correct way is to assign a shell variable and retrieve it?
$ make
something=abc
echo
echo $(something)
/bin/sh: something: not found
--
Regards,
Peng
- How to assign a shell variable in a makefile?,
Peng Yu <=