← Back to team overview

kicad-developers team mailing list archive

Re: Assorted issues


2. Build dependency issue involving common/selcolor.cpp

If that file is modified and KiCad is subsequently recompiled (i.e. "make -f makefile.g95", and without a "clean" beforehand), gerbview.exe is not updated (unless gerbview/set_color.o is deleted prior to recompiling).

Hardly a show-stopper, and maybe I could figure out how to fix that myself. But once again, if anyone else could figure out how to deal with it in short order... (The "Colors" dialog box, whose associated code is specified within the common/selcolor.cpp file, is used by EESchema and Pcbnew and GerbView.)


Last weekend, Richard added a "deps" target to the makefile.gtk, and so on linux we can now do a "make deps" every month or so. This builds header file depencies into the "*.d" files. He also enhanced make clean to remove the *.d files. After the *.d files are created, you then simply make as normal.

And then there was a change to the top most makefile.gtk in the project base dir, which propagate the "deps" target downwards into the chain loaded makefiles. It would be a few minute job to duplicate his efforts into the Windows makefiles.

For the child makefiles, its basically only this line

$(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null

and this one:

-include *.d

see the makefile.gtk files as an example.

use tabs of course, since makefiles don't like spaces.

I could not duplicate your problem on linux (after having done a make -f makefile.gtk deps a week ago), but I am not certain that the *.d files are making the difference on this specific issue since it executable depending on object, rather than object depending on header. Certainly a similar situation exists if you edit a header file and the dependent *.cpp files were not getting recompiled. But that is fixed with Richard's make deps enhancement.


Plan B is for you to extend the work of Igor using CMAKE to Windows. CMAKE also does a comprehensive job finding all the dependencies.

His initial support does not allow a DEBUG compile and link, so if you use the debugger on the code, this is a near term disadvantage with this plan B, otherwise it may be preferred.

At this moment, both the CMAKE system works on linux and the makefile.gtk "deps" system works on linux. But makefile.gtk DEBUG=1 lets me run the debugger.

Dick Hollenbeck
SoftPLC Corporation