Opened 6 years ago

Closed 6 years ago

#1016 closed defect/bug (fixed)

xpm/Makefile does not update or delete generated images

Reported by: sleske Owned by: KaZeR
Priority: major Milestone:
Component: core Version: git master
Severity: Keywords:
Cc:

Description

The Makefile under xpm is broken:

  • "make all" does not update the generated images if the source image is changed
  • "make clean" does not delete the generated images

This is rather annoying, because it means that updates to the source files will not be visible in the GUI after a build, unless the generated files are delete manually.

Change History (6)

comment:1 Changed 6 years ago by korrosa

What would be really annoying though, is if each time I did an svn up and re-compiled Navit, all images would be re-made: this takes a very long time (we are talking in the hour range here, whilst a compile takes a couple of minutes - all these times on a netbook).

So, I'd rather that make clean does not delete the generated images. However, it would be good to have something in place which updates images...

comment:2 Changed 6 years ago by tryagain

I presume this ticket is related to autotools build process.

At least for me, CMake build process at generic "make" run would update png files only if corresponding svg file have changed after pngs were built.

And AFAIK we're in process of switching from autotools to CMake.

comment:3 Changed 6 years ago by sleske

Yes, this is about the autotools build process.

At least for me, CMake build process at generic "make" run would update png files only if corresponding svg file have changed after pngs were built.

Well, yes, that is the expected behaviour. However, this does not work with the Makefile generated by autotools.

comment:4 Changed 6 years ago by sleske

@korrosa:

What would be really annoying though, is if each time I did an svn up and re-compiled Navit, all images would be re-made: this takes a very long time. So, I'd rather that make clean does not delete the generated images.

This is a non-sequitur. If you do an svn up and recompile, just "make" is sufficient - make will only re-compile changed files.

"make clean" on the other hand is supposed to delete all generated files - that includes images. So just use "make" after an update, and you'll be fine.

If "make" alone does not pick up all changes, that is a bug in the Makefile...

comment:5 Changed 6 years ago by sleske

Just committed rev.4972, which fixes "make clean" to delete the generated PNGs.

Still working on a fix to regenerate PNGs if the SVG was updated. It's almost working...

comment:6 Changed 6 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r.4977.

Makefile (generated from Makefile.am) now contains rules generated via "eval" for each PNG and size. Now changes to a .svg/.svgz file cause the right PNGs to be regenerated.

As a bonus, make runs *much* faster if nothing needs to be updated. Before, every PNG depended on *every* SVG, causing loads of filesystem activity. On my system, "make all" in directory xpm/ took over 7s even with a warm filesystem cache - now it's down to 80 ms :-).

Note: See TracTickets for help on using tickets.