Re: How to associate a suffix with several filetypes?

Thore Karlsen <sid-m3MN3Z/L/[email protected]> Mon, 10 May 2004 14:05:52 -0500
Newsgroups gmane.comp.tools.aap.user
Organization I've resigned.
Message-ID <[email protected]>
On Thu, 06 May 2004 21:49:29 +0200, Bram Moolenaar
<[email protected]> wrote:

[...]

>> However, I can't figure out how to tell AAP that .res files are valid
>> objects, libobjects, and dllobjects, so the linker can use these files
>> directly.
>> 
>> I could do something like this instead:
>> 
>> :filetype
>>    suffix res object
>> 
>> But this would result in an .obj file, and might cause a clash with
>> another .obj file, so I'd like to use the .res suffix.

>Good point.  I think currently you can only add the ".res" file in $LIBS
>or overrule the filetype:
>
>	:program foo : foo.c foo.res (filetype = object)
>
>You do need to specify the building separately then:
>
>	foo.res: foo.rc
>		:do compile $source

That's what I ended up doing (I actually ended up having a clash in an
ActiveX control where I couldn't control the file names). It works, but
it's not terribly clean. :)

>Somehow we should be able to specify that the linker also accepts "res"
>files besides "object" files.  This must be done in a flexible way, so
>that various compilers can tell what kind of files they can link
>together.  And still disallow things that will fail.

[...]

>It's not easy to think of a simple solution that works in a generic way.
>Ideas?

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.

-- 
Be seeing you.



-------------------------------------------------------
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