Re: [Tack-devel] Prime Mover commands
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: tim k. <gt...@di...> - 2006-07-26 02:09:06
|
At 8:06 PM -0400 7/25/06, tim kelly wrote: >Much of the parts are self-explanatory, and I'll post once I get the >complete pmfile working (I've already added afile with command "%AS%" where >AS = as). -- $Source: memcopy/pmfile,v $ -- $State: Exp $ include "c.pm" ROOTDIR = ROOTDIR or posix.getcwd().."/" local d = ROOTDIR OBJDIR = OBJDIR or d.."obj/" memcopy = cprogram { cfile { CBUILDFLAGS = CBUILDFLAGS or "-static -Winline -O3", d.."main.c", }, afile { ASBUILDFLAGS = ASBUILDFLAGS or "-mregnames", d.."fourbytes.s", }, afile { ASBUILDFLAGS = ASBUILDFLAGS or "-mregnames", d.."sixteenbytes.s", }, outputs = {"%U%/memcopy"}, install = { pm.install("%OBJDIR%memcopy"), } } default = group { memcopy, } The ASBUILDFLAGS are working, but the CBUILDFLAGS aren't located properly, I think, as the code isn't statically linking the libc library. I did modify the c.pm file in a few places: CCOMPILER = CCOMPILER or "cc" ASCOMPILER = ASCOMPILER or "as" AS = "%ASCOMPILER% %ASBUILDFLAGS% -o %out% %in%" afile = simple_with_clike_dependencies { class = "afile", command = {"%AS%"}, outputs = {"%U%-%I%.o"}, } I added the choice of compilers because I think it is important to be able to have that choice. Overall I found this to be pretty straightforward, since the work is done through inheritence and it's just a matter of describing the objects in the pmfiles. I am going to work on the original project I've been wrestling with and I'll post something when I get it completely contained by pm. I really appreciate how clear the error messages were. The above pmfile could still be tweaked to do individual component building and then build the program through the group object, instead of having it all in a single cprogram, although I haven't gone through that yet. (Gee, any thoughts of a Makefile->pmfile converter?) thanks! tim Gregory T. (tim) Kelly Owner Dialectronics.com P.O. Box 606 Newberry, SC 29108 "Anything war can do, peace can do better." -- Bishop Desmond Tutu |