← Back to team overview

kicad-developers team mailing list archive

Re: problem when compiling kicad with -DMAINTAIN_PNGS=ON

 

Dick,
that was very helpful. Can you please tell me how to do this:

# I have not been a PNG maintainer, but want to be for 10 minutes:
$ ccmake .
Set MAINTAIN_PNGS to on, configure, generate, quit ccmake.

All in all it sounds easier for my to just send you the new .svg files
in a zipped folder. Would that be acceptable?

Thanks a lot for the explanation.

cheers
Fabrizio





On Sat, Sep 17, 2011 at 5:29 AM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
> On 09/16/2011 03:32 PM, fabrizio wrote:
>> I do simply run make, I do not really understand how this is not a
>> problem but if you think so, it is all right with me.
>>
>> Just notice however that you will get about 420 files to patch
>> eveytime i change one svg file. As long as you are fine with it, I am
>> ok.
>>
>> cheers
>> Fabrizio
>
> Fabrizio,
>
> Its possible you still have a mis-understanding.
>
> It sounds like you are creating a new build directory each time.  Keep your build
> directory, forever.  The first time you build Kicad, everything will get built.
> Thereafter only that which needs to get built will get built.  Makefile has dependencies
> in it.
>
> The discussion is the same regarding *.o files and *.png files.  They get built one time,
> as they are needed to get built.  Then only when something upstream in their dependency
> chain changes, will they get built again.
>
> Here I show an example to prove it:
>
> $ bzr up
> $ cd build
>
> # I have not been a PNG maintainer, but want to be for 10 minutes:
> $ ccmake .
>
> Set MAINTAIN_PNGS to on, configure, generate, quit ccmake.
>
> # most all *.svg's have changed and those that are newer than my *.png's cause generation
> of new *.png's, lets say most all of them this first time:
>
> dick@dick-intel:/svn/kicad/testing.checkout/build$ make -j 5
> [  0%] Creating 48 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/viewlibs_icon.png
> [  0%] Built target kbool
> Scanning dependencies of target 3d-viewer
> [  0%] Built target polygon
> [  0%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_aux.cpp.o
> [  0%] Built target potrace
> [  0%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_canvas.cpp.o
> Scanning dependencies of target pcbcommon
> Scanning dependencies of target common
> [  0%] Building CXX object common/CMakeFiles/pcbcommon.dir/pcbcommon.cpp.o
> [  0%] Building CXX object common/CMakeFiles/common.dir/dialog_about/AboutDialog_main.cpp.o
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_arc.png
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_bus2bus.png
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_bus.png
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_circle.png
> [  0%] Building CXX object common/CMakeFiles/pcbcommon.dir/footprint_info.cpp.o
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_component.png
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_corner.png
> [  0%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_class.cpp.o
> [  0%] Building CXX object common/CMakeFiles/common.dir/dialog_about/dialog_about.cpp.o
> [  0%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_draw.cpp.o
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_dashed_line.png
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_dimension.png
> [  0%] Building CXX object common/CMakeFiles/pcbcommon.dir/class_layer_box_selector.cpp.o
> [  0%] Building CXX object common/CMakeFiles/common.dir/dialogs/dialog_image_editor.cpp.o
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_entry.png
> [  0%] Building CXX object common/CMakeFiles/pcbcommon.dir/__/pcbnew/basepcbframe.cpp.o
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/add_glabel.png
> [  0%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/3d_frame.cpp.o
> [  0%] Building CXX object common/CMakeFiles/common.dir/dialogs/dialog_get_component.cpp.o
> :
> :
> # lots more png's and cpp's are made, and all programs finish linking here
> :
>
>
> # Now I simulate editing a single *.svg file, by using touch to make its directory entry
> newer than its *.png and its *.cpp:
>
> dick@dick-intel:/svn/kicad/testing.checkout/build$ touch ../bitmaps_png/sources/bom.svg
>
> # Now I build again:
>
> dick@dick-intel:/svn/kicad/testing.checkout/build$ make -j 5
> [  0%] Built target kbool
> [  0%] Built target polygon
> [  0%] Built target potrace
> [  0%] Creating 26 pixel tall /svn/kicad/testing.checkout/bitmaps_png/tmp/bom.png
> [  0%] Built target 3d-viewer
> [  1%] Built target pcbcommon
> [  4%] Built target common
> [  4%] Creating /svn/kicad/testing.checkout/bitmaps_png/png_26/bom.png
> [  4%] Creating /svn/kicad/testing.checkout/bitmaps_png/cpp_26/bom.cpp
> Scanning dependencies of target bitmaps
> [  4%] Building CXX object bitmaps_png/CMakeFiles/bitmaps.dir/cpp_26/bom.cpp.o
> Linking CXX static library libbitmaps.a
> [ 80%] Built target bitmaps
> Linking CXX executable kicad
> Linking CXX executable cvpcb
> Linking CXX executable gerbview
> [ 81%] Built target kicad
> Linking CXX executable bitmap2component
> [ 81%] Built target bitmap2component
> Linking CXX executable pcb_calculator
> [ 82%] Built target cvpcb
> [ 83%] Built target pcb_calculator
> Linking CXX executable eeschema
> Linking CXX executable pcbnew
> [ 85%] Built target gerbview
> [ 91%] Built target eeschema
> [100%] Built target pcbnew
> dick@dick-intel:/svn/kicad/testing.checkout/build$
>
> # Notice only the *single* bom.png and bom.cpp were built.  Nothing else.  The Makefile
> seems sound, the CMake script seems fine.
>
> # Now I revert all my *.cpp files back to those that I just got with *bzr update*, since I
> really do not want to be a png maintainer, and go back simply living with the *.cpp files
> that come in with each bzr update.
>
> # Note that the reason that many *.png's were built the first time is that they were not
> checked into the repo, and so were older than the corresponding *.svg files, on my system
> only.
>
> # I don't want my next patch to include any of these *.cpp files.  If bom.cpp was new, I'd
> do this slightly differently:
>
> $ bzr revert ../bitmaps_png/cpp_*/*.cpp
>
> $ make
>
> only the bitmaps_png *.cpp files get compiled again here.
>
> $ ccmake .
>
> Turn off MAINTAIN_PNGS here, reconfigure, regenerate, quit.
>
>
> Hope this helps,
>
> Dick
>
>


Follow ups

References