Re: [A-a-p-user] How to associate a suffix with several filetypes?
Brought to you by:
vimboss
From: Bram M. <Br...@mo...> - 2004-05-06 19:49:48
|
Thore Karlsen wrote: > I'm trying to compile resource files in MSVC. It takes .rc files as > input, and the output files normally have the suffix .res. > > I've got the following: > > :filetype > suffix res res > :action compile rc > :sys rc /Fo$target $source > :route rc res > compile > > 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 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. Perhaps we can specify the filetypes that a build action can use. Oh, we actually already have that: :action build_msvc object,res ...building... Tricky is that we only get to "build_msvc" through the default "build" action that checks $C_BUILD_ACTION (this is in default.aap). And the default build action does not specify "res", of course. It's not easy to think of a simple solution that works in a generic way. Ideas? -- hundred-and-one symptoms of being an internet addict: 146. You experience ACTUAL physical withdrawal symptoms when away from your 'puter and the net. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 /// |