Thanks Glynn, I backported your fixes to releasebranch_6_3. Martin
2008/3/21, Glynn Clements <[EMAIL PROTECTED]>: > > Markus Neteler wrote: > > > I found that > > gui/wxpython/vdigit/ > > fails on > > make -j4 > > > > Something needs to be serialized there. > > > Fixed in SVN: > > -default: $(SHLIB) install_vdigit > +default: install_vdigit > > -install_vdigit: > +install_vdigit: $(SHLIB) > $(INSTALL_DATA) _grass6_wxvdigit.so $(ETCDIR)/vdigit/ > $(INSTALL_DATA) grass6_wxvdigit.py $(ETCDIR)/vdigit/ > > Note to anyone writing Makefiles: a dependency line such as: > > target: source1 source2 > > states that source1 and source2 must be built before running the > commands for the rule. It does not require that source1 and source2 > are built in that order. Although that will typically be the case for > a single-threaded build, a parallel build will attempt to build > source1 and source2 concurrently. > > If source1 needs to be built before source2, this must be expressed through > dependencies, e.g.: > > target: source2 > > source2: source1 > > Another problem with vdigit: the C++ wrapper file grass6_wxvdigit_wrap.cpp > is *not* a source file (it is built from the .i files using SWIG), and > should not be stored in the SVN repository. It should be generated by SWIG > during the build process. > > However, this also lacks correct dependency information. First, > grass6_wxvdigit.i doesn't list the various .i files as dependencies, > so it won't be re-built if one of them is modified. Secondly, the rule > which generates grass6_wxvdigit_wrap.cpp doesn't actually have that > file as a target, so it won't get run if the file needs to be > re-built. > > Finally, while writing this, I've just noticed that gui/wxpython/Makefile > has: > > default: install_scripts parsubdirs > > which will run both targets concurrently. This is theoretically > problematic, as vdigit/Makefile assumes that the etc/wxpython/vdigit > directory has already been created. In practice, you'll get away with it, > as the chances of compiling the entire vdigit module before a mkdir > command has completed are essentially nil. > > However, to avoid setting a bad example which may cause actual problems if > someone follows it, I've changed the rule to: > > default: install_scripts > $(MAKE) parsubdirs > > Note that parsubdirs is a "phony" target, so the following *won't* work: > > default: parsubdirs > > parsubdirs: install_scripts > > Okay, I was wrong about the "finally" above; I've also changed: > > - $(INSTALL_DATA) _grass6_wxvdigit.so $(ETCDIR)/vdigit/ > + $(INSTALL_DATA) $(SHLIB) $(ETCDIR)/vdigit/ > > as the suffix won't be ".so" on all platforms. > > > -- > > Glynn Clements <[EMAIL PROTECTED]> > -- Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa * _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
