Code Review #1178

Bug #845: Speed on windows systems

Make dependency checking optional

Added by Alberth almost 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:2010-07-31
Priority:NormalDue date:
Assignee:-% Done:


Target version:0.5.0


For NewGRF projets, running a dependency calculation is next to useless.
Therefore, I propose to disable it.

Attached patch introduces a DO_DEP_CHECK variable that controls whether or not to perform dependency checking.
For now, I have left it as a seperate setting. but you could consider making it depend on the type of project.

With thanks to Foobar for testing

optional_depcheck.patch Magnifier (1.28 KB) Alberth, 2010-07-31 21:24

optional_depcheck_firs.diff Magnifier (1.77 KB) planetmaker, 2010-08-13 08:55

optional_depcheck_firs2.diff Magnifier (1.86 KB) planetmaker, 2010-08-13 09:15

mdep.diff Magnifier (7.24 KB) planetmaker, 2010-08-20 14:48

mdep2.patch Magnifier - new patch (9.25 KB) Alberth, 2010-08-20 18:01

Associated revisions

Revision 129:8a31de1c0292
Added by planetmaker almost 10 years ago

Add #1178: Alternative dependency check implemented in python (script by Alberth)
There are now two types available: normal (as before, default) and mdep, the new
script. Select by setting DEP_CHECK_TYPE=mdep in your Makefile.local

Revision 192:73c92def7aa6
Added by planetmaker almost 10 years ago

Change #1178: Remove a few unneeded ifdefs


#1 Updated by planetmaker almost 10 years ago

I actually added thevdep check for the reason that newgrfs freque.tly reqired differently spellt graphics or other include files (case!) an as such it broke on case sensitive systems where it did not error out on the original author's machine. Not useless I think.

#2 Updated by yexo almost 10 years ago

<Yexo> planetmaker: the major problem #1178 is that the dependency check takes sometimes longer than the actual compiling process, especially on windows machines
<Yexo> and during development you don't need to do a depcheck every time you rebuild, so that patch should add an option to disable the depcheck, mainly useful while developing
<Yexo> it's not for the average user just checking out a copy of a newgrf repo
<FooBar> that patch is a great help for me, reduces build times by around 75%!

#3 Updated by planetmaker almost 10 years ago

  • Target version set to 0.4.0

#4 Updated by planetmaker almost 10 years ago

Attached a patch to the Makefile system of FIRS (it should also work elsewhere, but the hunk in is then not needed).

This patch simply disables the dep check. That is for re-building the newgrf you'll need to run 'make remake' as make will (still) report that the grf is up to date once built.

The dep check is disabled by giving DEP_CHECK_TYPE= as command parameter or setting it in Makefile.config or Makefile.local

#5 Updated by planetmaker almost 10 years ago

Updated version. The need to call 'remake' is gone.

#6 Updated by planetmaker almost 10 years ago

python dep check. Time saved: 33%

#7 Updated by Alberth almost 10 years ago seems to work fine, the surrounding makefile is messed up though, I could not get it to work in a sane way.

#8 Updated by planetmaker almost 10 years ago

  • Target version changed from 0.4.0 to 0.5.0
  • Parent task set to #845

#9 Updated by planetmaker almost 10 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Implemented in various commits, found in 0.4.5 and later

Also available in: Atom PDF