Re: [Tack-devel] Prime Mover commands
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: David G. <dg...@co...> - 2006-08-02 22:52:15
|
tim kelly wrote: [...] >> pm.intermediatecache =3D o >=20 > I did some digging into the pm script in the Subversion web interface a= nd > found that this perhaps should be pm.intermediate_cache_dir, which seem= s to > give the desired results. Oops! Sorry --- I should know better than to trust my memory late at nigh= t... [...] > I really like the INDEX principle, by the way. I do a lot of "objdump = -d"s > on object files, so having something that caches the builds allows me t= o > compare changes between flags (like -On) much easier. It also undersco= res > the need for being able to change the intermediate cache directory, so = that > instead of all of the cached object files going into a single directory= , a > shadow object file tree can be constructed for easier traversal. Unfortunately, that's not what the intermediate cache is for --- it's not= the final destination of the built files, it's where pm stores (for its own nefarious purposes) the *intermediate files* it uses to build things. It'= s not supposed to be public, which is why it defaults to a hidden directory. (I= n fact, the only reason the files in there have human-readable names is to = make debugging easier. The first version called everything 1.o, 2.o, 3.o, 4.a,= etc.) If you want access to anything pm makes, you have to export it using 'ins= tall =3D pm.install()'. If you want access to all .o files, you should be able= to do this by subclassing the cfile{} rule. [long example removed --- it actually turned out to be more interesting t= han I expected, so I checked it in. See: http://svn.sourceforge.net/viewvc/*checkout*/primemover/pm/test-pmfiles/c= omplex-c-program.pm?revision=3D33 I also found a bug in c.pm, so you'll need a new version of that as well = if you want rebuilding to work properly.] > How do I do a "Save and Restore" for the pm.intermediate_cache_dir sett= ing, > so that it is local in scope wrt to the pmfile, or even the object bein= g > built? You can't, I'm afraid --- once execution of your pmfile script has finish= ed, whatever value you last set it as sticks. It *might* be possible to trick= pm into running code where you change it, but all that's likely to happen is= horribly confusing pm. > This, of course, > brings up a question I've had regarding threaded builds, equivalent to = make > -Jn where n is the number of threads (which also invokes stuff like .WA= IT > and the like). Currently not on the drawing boards... sorry! pm guarantees the order in = which things are built (nodes are recursed into in strict depth-first order) wh= ich means threaded builds would be Really Hard. However, if you build with -p= ipe you should get most of the benefits of having a multiprocessor machine wi= thout needing them. --=20 +- David Given --McQ-+ "Gaping from its single obling socket was | dg...@co... | scintillating, many fauceted scarlet emerald..." | (dg...@ta...) | --- Jim Theis, _The Eye of Argon_ (spelling +- www.cowlark.com --+ original) |