Dear GNU MAKE,
I'm having problems with my makefile. I want to descend into a
directory and issue shell commands to extract a list of files using
either `ls` or `echo` and store in a variable. Here is the command:
install:
cd LINUX/mod; mod2=$(shell echo *)
I would like to descend to LINUX/mod directory from current
directory, echo the filenames and store in variable mod2
for later use. When I run make, it descends to LINUX/mod
directory but does not run echo in the new directory. Instead
echo gives the file list of current directory.
If I change the commands to
install:
cd LINUX/mod; $(MAKE)
then make tries to find makefile in LINUX/mod directory as
it should. Why the first command does not work?
Is this a bug or wrong commands syntax?
I also tried the following without success.
install:
mod2=$(shell `ls LINUX/mod`)
In this case `ls` gives the right list of filenames but shell
attempts to execute the filenames as if it were commands.
install:
mod2=$(`cd LINUX/mod`; $(shell echo *))
mod2=$(`cd LINUX/mod`; `echo *`)
mod2=$(`echo LINUX/mod/*`)
These don't work at all.


I'm using
make version 3.79.1
Linux node1 2.4.18-cluster #1 i686 unknown

Any help is appreciated.
Sincerely,

Charles J. Ju
042-870-1668
KBSI Institute, Korea




_______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to