Vaclav Petras wrote: > Now, I'm asking for help with Makefile for this module. Martin helped > me a lot in identifying what has to be done and he prepared the > Makefile [2]. But this Makefile need to be generalized in order to > avoid code duplication. I'm not able to do it so I'm asking you to > help.
If you want to avoid duplication, it would help to avoid giving each module two distinct names (e.g. g.gui.mapswipe and MapSwipe). A prefix or suffix can be handled easily enough, but the case conversion is more awkward. make doesn't have a function for case conversion, and using $(shell ...) is inefficient and relies upon the existence of a utility such as "tr". If one can't be generated automatically from the other, then we'd need to implement a table, as is done for library names in Grass.make. "mapswipe" can be generated from "MapSwipe" (at the cost of running an external command), but we can't do the reverse. Also, if one form uses camel-case while the other use underscores, it gets more complicated. Basically: how important is it for each module to have a WXPGM distinct from PGM? -- Glynn Clements <[email protected]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
