Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ollydbg on November 23, 2010, 11:38:52 am

Title: I don't change any source code, but click the build button will cause rebuild
Post by: ollydbg on November 23, 2010, 11:38:52 am
I meet a strange problem.

I have a simple project(quexparser, http://code.google.com/p/quexparser).

Today, I have never change any source code, but everytime I click the build button, the while project will be rebuild. Is there something wrong?

thanks.

windows, latest debugger branch nightly.
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: Jenna on November 23, 2010, 11:57:21 am
Does this happen to all projects, or is it just this one ?
If it is the second, try to clean and/or manual remove the obj and other output-folders.
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: ollydbg on November 23, 2010, 12:13:47 pm
thanks jens.
I just tested other project.
 it seems the bug is only related to the quex library.( the project using quex library has this kind of problem, but others were not)

I have quex library 0.55.3 before. today, the new quex library 0.55.4 has released, so I just update to this version. So, the header files of quex library was updated.

Now, all the project using quex library meets this kind of problem. Even I totally delete the obj and bin folder, the problem still happens again and again.

Seems it is related to the new quex header files. but not sure how to solve this problem. :(
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: Jenna on November 23, 2010, 12:19:40 pm
Did you check the timestamps of the new quex-files ?
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: ollydbg on November 23, 2010, 12:25:09 pm
Did you check the timestamps of the new quex-files ?
So, all the header files from quex-lib header should be older than my project??
I will check it, it seems one file (a python script) is 2010-11-24, and my windows system time is 2010-11-23 right now.
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: Jenna on November 23, 2010, 12:32:22 pm
Did you check the timestamps of the new quex-files ?
So, all the header files from quex-lib header should be older than my project??
I will check it, it seems one file (a python script) is 2010-11-24, and my windows system time is 2010-11-23 right now.
Yes, at least after a build or rebuild.
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: ollydbg on November 23, 2010, 12:50:34 pm
I have solved my problem. :D

I just download a tool ( BatchTouch  (http://freeware.the-meiers.org/BatchTouchWin.zip)is a utility to batch-change the creation and or modification date of files and folders. it is a free ware. ) to change all the files' time-stamp under the quex foder and sub-folders. I change them to 2010-11-22 which is an older time stamp.

Now everything works very fine!!!

For those who meet the same problem, you can do like me.

thanks jens for the help!!!

BTW: not sure how to do it under plain windows batch script.

Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: reckless on November 23, 2010, 03:52:26 pm
can be done via batch file but you need touch.exe from either msys (needs the msys dll) or gnuwin coreutils (native windows)

some thing like this should do

@touch -t "%*"

where %* is the date time etc passed to the batch file.

so if your batch file is called touchthis.bat then call it like this touchthis.bat 2010-11-23


Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: Jenna on November 23, 2010, 04:11:51 pm
To get the actual timestamp you can try
Code
copy *.*,,+
or put in a batch-file that scans all files in all subdirs and copies them.
Based on http://www.computing.net/answers/programming/batch-change-file-modified-date/17132.html (http://www.computing.net/answers/programming/batch-change-file-modified-date/17132.html) .
Title: Re: I don't change any source code, but click the build button will cause rebuild
Post by: ollydbg on November 24, 2010, 02:17:37 am
thanks jens and reckless for your time and help!!!