Re: How to associate a suffix with several filetypes?
Bram Moolenaar <[email protected]> Mon, 10 May 2004 22:44:36 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Thore Karlsen wrote: > > :program foo : foo.c foo.res (filetype = object) These parenthesis should be curly braces, of course. > Would it make more sense to have aliases for filetypes? Like for certain > compilers (like MSVC), an object is equal to a libobject, a dllobject, a > res file, etc. If we can't tell AAP that these are all equal, we have to > go through each tool and add all of these file types to all > compilers/linkers/lib tools, etc. > > Something like: > > :fileobject > alias res object > alias object libobject > alias libobject dllobject > > In this example I assumed transitivity and reflexivity, but that might > not be the best way to do it. There could perhaps be an attribute to > alias that specified whether it's transitive and/or reflexive. > > I would love to see something like this. I've found the pigeonholing of > a file to a single file type very limiting. Makig a difference between libobject, dllobject and object files was intentionally. You normally can't mix them. I think the aliases are confusing, since we only would use them for certain operations. They _are_ different types, even when they can sometimes be equivalent. The thing we really need is a way to specify the filetypes that a ":program" command can pass to the build action. And allow tools to specify that. Same mechanism can then be used for ":dll", ":lib", etc. Currently this is hard-coded in the add_buildrule() function, in DoAddDef.py. The "objtype" variable is set to the filetype that is expected. This should then be a list of filetypes. This makes the function more complicated, but I think it's doable. This -- Get a life? What is the URL where it can be downloaded? /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html /// ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3