This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin make target is never determined up to date
Yea I tried to add sleep, no good. Consequent calls doesn't go
$(jar_target_dir) target, they only run $(chrome_jar_file) target.
It's NTFS, Windows 7. The other system which performs as expected Windows
XP, again NTFS.
Here is some additional information:
Reading makefiles...
Updating goal targets....
File `all' does not exist.
Prerequisite `../bin/build/chrome' is newer than
target `../bin/build/chrome/alt.jar'.
Must remake target `../bin/build/chrome/alt.jar'.
Creating chrome JAR file.
updating: content/about.js (deflated 66%)
updating: content/sprintf.js (deflated 52%)
...
and stats
$ stat ../bin/build/chrome/alt.jar ../bin/build/chrome
File: `../bin/build/chrome/alt.jar'
Size: 29220 Blocks: 32 IO Block: 65536 regular file
Device: 22c6affh/36465407d Inode: 59672695062724268 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ xxx) Gid: ( 513/ None)
Access: 2010-05-05 13:03:01.066457300 +0900
Modify: 2010-05-05 13:03:01.088960100 +0900
Change: 2010-05-05 13:03:01.091460400 +0900
File: `../bin/build/chrome'
Size: 0 Blocks: 0 IO Block: 65536 directory
Device: 22c6affh/36465407d Inode: 3940649674014457 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ xxx) Gid: ( 513/ None)
Access: 2010-05-05 13:03:01.090960400 +0900
Modify: 2010-05-05 13:03:01.090960400 +0900
Change: 2010-05-05 13:03:01.090960400 +0900
as you can see `chrome` dir is really newer than `alt.jar`
Jeremy Bopp-3 wrote:
>
> MichaelKim wrote:
>> Cygwin make always processing `$(chrome_jar_file)` target, after first
>> successful build. So I never get up to date message and always see
>> commands
>> for `$(chrome_jar_file)` are executing.
>>
>> However it happens only on Windows 7. On Windows XP once it built and
>> intact, no more builds.
>> I narrowed down the issue to one prerequisite - `$(jar_target_dir)`.
>>
>> Here is part of the code
>>
>> # The location where the JAR file will be created.
>> jar_target_dir := $(build_dir)/chrome
>>
>> # The main chrome JAR file.
>> chrome_jar_file := $(jar_target_dir)/$(extension_name).jar
>>
>> # The root of the JAR sources.
>> jar_source_root := chrome
>>
>> # The sources for the JAR file.
>> jar_sources := bla #... some files, doesn't matter
>>
>> jar_sources_no_dir := $(subst $(jar_source_root)/,,$(jar_sources))
>>
>> $(chrome_jar_file): $(jar_sources) $(jar_target_dir)
>> @echo "Creating chrome JAR file."
>> @cd $(jar_source_root); $(ZIP) ../$(chrome_jar_file)
>> $(jar_sources_no_dir)
>> @echo "Creating chrome JAR file. Done!"
>>
>> $(jar_target_dir): $(build_dir)
>> echo "Creating jar target dir..."
>> if [ ! -x $(jar_target_dir) ]; \
>> then \
>> mkdir $(jar_target_dir); \
>> fi
>>
>> $(build_dir):
>> @if [ ! -x $(build_dir) ]; \
>> then \
>> mkdir $(build_dir); \
>> fi
>>
>>
>> so if I just remove `$(jar_target_dir)` from `$(chrome_jar_file)` rule,
>> it
>> works fine.
>> Also tried to use `-e` in `if`.
>> So again, question is why in windows 7 target is never up to date and it
>> has
>> always to process it.
>
> Have you tried adding a short sleep after creating $(jar_target_dir)?
> Maybe try something in the range of 2 to 5 seconds. BTW, are you
> building on a FAT filesystem or NTFS?
>
> My guess here is that the timestamps on $(jar_target_dir) and
> $(chrome_jar_file) are the same, at least as far as make is concerned.
> The FAT filesystem, with its 2 second resolution, is somewhat prone to
> this kind of problem.
>
> -Jeremy
>
> --
> 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-tp28454344p28456659.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