[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to declare dependency over every files under current directory?
From: |
Paul D. Smith |
Subject: |
Re: how to declare dependency over every files under current directory? |
Date: |
Mon, 25 Jun 2001 22:33:43 -0400 |
%% Jack Zhou <address@hidden> writes:
jz> Sorry I didn't make myself clear enough, what I meant is
jz> dependency over every .class files under directory, these files
jz> may be in sub directories of current directory. If they are all
jz> under directory, I can simply use wildcard function. The tricky
jz> part is if they are in arbitary subdirectories, I don't know how
jz> to do this. Please advise, thanks.
SOURCES := $(shell find . -name '*.class' -print)
jz> --- address@hidden wrote:
>> If by class files you mean .class file you could do
>> something like
>>
>> SOURCES = $(shell ls -1 *.jav 2> /dev/null )
In general you never want to use "=" with expensive functions like
$(shell ...). Always use :=, unless you really have a specific need for
"=".
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist