145k views
5 votes
In a Makefile, when file Bill depends on file Ted, how does make determine when it's time to recreate Bill from Ted?

a) By comparing modification timestamps
b) By checking the file sizes
c) By looking at the file permissions
d) By consulting the file's content

User PooSH
by
8.6k points

1 Answer

6 votes

Final answer:

Make determines when to recreate file 'Bill' from 'Ted' in a Makefile by comparing their modification timestamps. If 'Ted' is newer, 'Bill' is considered outdated and make rebuilds it.

Step-by-step explanation:

In a Makefile, when a file named 'Bill' depends on another file named 'Ted', make determines when it's time to recreate 'Bill' from 'Ted' by comparing modification timestamps of the files. Make checks if the source file 'Ted' has a more recent modification timestamp than the target file 'Bill'. If the source file is newer, make concludes that the target file is outdated and needs to be rebuilt using the specified rules and commands in the Makefile.

User Aaron Douglas
by
8.0k points