bug-make
[Top][All Lists]
Advanced

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

problems with directory in make


From: JaSeong Ju
Subject: problems with directory in make
Date: Wed, 11 Jun 2003 10:01:38 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ko-KR; rv:1.2.1) Gecko/20030225

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






reply via email to

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