Hi Experts,
I am new to GNU make and doesn't have much experience with builds.
I wanted to test a scenario where i need to modify the condition that
determines weather
a target needs to be build or not.
Consider the following rule:
foo.o : foo.c
cc -c foo.c
Currently if i am not wrong make builds the target:
- if either the target doesn't exist
- or the time-stamp of the target is older than the last modified time of
the files
I need to modify to something like
Build happens if
- if either the foo.o doesn't exist;
- timestamp of foo.o is equal to the timestamp of the foo.c
And after every successful build of the target i touch the target file to
point to timestamp of foo.c
I want to do this because the timestamp of my source file (foo.c) could
change both back and forth.
So i need to build the target only if the timestamp changes for source.
Is it possible to achieve this by just defining the makefile rules or would
i need to modify the
code of GNU make.
Thanks and Regards
--
View this message in context:
http://old.nabble.com/How-to-modify-algorithm-that-determines-weather-a-target-needs-rebuild-tp29378571p29378571.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make