[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to make "gmake" recompile the files based on their dependencies'
From: |
parth |
Subject: |
Re: how to make "gmake" recompile the files based on their dependencies' modified time |
Date: |
Thu, 2 Oct 2008 23:51:55 -0700 (PDT) |
Ya, that worked.
But I still didn't get what was wrong with my code.
Is it that I need to write all as a separate statement without any actions
for this modified time stuff to work ?
thanks, that worked.
parth
=====================================================================
gshejin wrote:
>
> Hi
>
> I think the way in which you are referring the dependencies it's not
> right.
> You can try this and check
>
> ******************************************
> PROGRAM = Astar
> DEPENDENCIES = Maze.o Maze.h
>
> all: $(PROGRAM)
>
> %.o : %.cc %.h
> g++ -c $<
> $(PROGRAM): $(DEPENDENCIES)
> g++ Maze.o Astar.cc -o $(PROGRAM)
> clean:
> rm *.o $(PROGRAM)
> ********************************************
>
> -SG
>
>
> On Fri, Oct 3, 2008 at 11:30 AM, parth <address@hidden> wrote:
>
>>
>> Hello guys,
>>
>> I have create a simple makefile as below.
>>
>> But Whenever i execute make command, it doesn't check if any of the files
>> have modified time greater that the object file's creation time and just
>> recompiles the all target.
>> I have to do make clean everytime I want the Maze.cc to recompile
>>
>> ******************************************
>> PROGRAM = Astar
>> DEPENDENCIES = Maze.o Maze.h
>>
>> all: $(DEPENDENCIES) $(PROGRAM).cc
>> g++ Maze.o Astar.cc -o $(PROGRAM)
>>
>> %.o : %.cc %.h
>> g++ -c $<
>>
>> clean:
>> rm *.o $(PROGRAM)
>> ********************************************
>>
>> Can anyone tell me where am I making a mistake?
>>
>> regards,
>> parth
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-make-%22gmake%22-recompile-the-files-based-on-their-dependencies%27-modified-time-tp19792569p19792569.html
>> Sent from the Gnu - Make - Help mailing list archive at Nabble.com.
>>
>>
>>
>> _______________________________________________
>> Help-make mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/help-make
>>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>
>
--
View this message in context:
http://www.nabble.com/how-to-make-%22gmake%22-recompile-the-files-based-on-their-dependencies%27-modified-time-tp19792569p19792963.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.