This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin make target is never determined up to date
Yes, that's the problem, I am not supposed to update prerequisite file inside
of prerequisite dir.
But it's not related to WinXP or Win7, because it also worked _incorrectly_
on other Win7.
So what is happening that in some cases the mtime of directory is exactly
the mtime of the file created. This is confusing.
@DaveK: I'll check the article for sure, thanks!
Dave Korn-6 wrote:
>
> On 05/05/2010 06:04, Jeremy Bopp wrote:
>> MichaelKim wrote:
>
>>> Prerequisite `../bin/build/chrome' is newer than
>>> target `../bin/build/chrome/alt.jar'.
>>> Must remake target `../bin/build/chrome/alt.jar'.
>
>> So let me get this straight. The JAR file you're trying to build is
>> within a directory which is listed as a prerequisite of that JAR file?
>> Unless I'm completely off base, it would seem to be that this is
>> expected behavior then. If you mess with the contents of a directory,
>> such as by adding a file to it, the last modified timestamp of the
>> directory is going to be updated. I would expect that to happen after
>> the file is added to the directory which could very well be *after* the
>> last modified timestamp of the file is set. Thus the directory will
>> appear newer than the file.
>
> Yep:
>
>> $(chrome_jar_file): $(jar_sources) $(jar_target_dir)
>
> The idea is supposed to be to make the jar file depend on the output
> dir, so
> that if the output dir doesn't exist, the $(jar_target_dir) rule will get
> invoked to mkdir it; but it doesn't anticipate that the timestamp of an
> existing dir changes everytime you touch the files within it.
>
> For a discussion of better ways to create an output dir in make, see:
>
> http://www.cmcrossroads.com/cm-articles/columns/ask-mr-make
>
> The particular article you're looking for is #26, "Making directories in
> GNU
> Make":
>
> http://www.cmcrossroads.com/ask-mr-make/6936-making-directories-in-gnu-make
>
> I don't know why this would be working on the old XP machine, unless
> it's
> running an older version of cygwin that had a bug or didn't implement
> updating
> directory timestamps.
>
> cheers,
> DaveK
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
>
>
--
View this message in context: http://old.nabble.com/Cygwin-make-target-is-never-determined-up-to-date-tp28454344p28467628.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple