Re: [RFC] Enable compilation by Makefile for the MSVC toolchain
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Aug 18, 2009, 18:42 UTC
- Message-ID
- <alpine.LNX.2.00.0908181420330.7195@iabervon.org>
- In-Reply-To
- <4A8AEAF5.6070205@gmail.com>
On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
Show 18 quoted lines
> Johannes Schindelin said the following on 18.08.2009 16:11: > > On Tue, 18 Aug 2009, Marius Storm-Olsen wrote: > > > So, instead of rely on these vcproj files which *will* go stale, we > > > can simply use the same Makefile system which everyone else is > > > using. :) After all, we're just compiling with a different > > > compiler. The end result will still rely on the *msysGit > > > environment* to function, so we already require it. Thus, GNU Make > > > is present, and we can use it. > > > > We can also use sed or perl to generate/modify the .vcproj files, or > > run CMake (once Pau got it to build), and package the stuff using zip > > (once I got that to build). > > Really? That would be some script being able to parse the Makefile, and create > something reasonable as a vcproj script :) Keeping all the options in sync, > conditional files/libs, all the various end executables (a separate .vcproj > for each of them, and a solution file (.sln)to tie them all together into a .. > "solution", a complete product blah blah blah) etc.
I think it wouldn't be impossible to split the Makefile into an easy-to-parse part and an irrelevant-to-vcproj part. Certainly you don't need GNU Make to read a file:
SCRIPT_SH += git-am.sh SCRIPT_SH += git-bisect.sh
SCRIPT_PERL += git-add--interactive.perl
PROGRAM_NAMES += git-fast-import
BUILTINS_IN_OBJS += add
(etc)
That is, we can probably describe the project sufficiently with a lot of
VAR += value
lines, using only constant values and variables we specify, and then the Makefile declares them empty and does an
include UserServicableParts
and puts together the variables it needs. And things that aren't GNU Make could also process this file without enormous difficulty, since it's essentially a .ini file or java resource file with a stray + on each line. Of course, people interested in the vcproj thing would have to update whatever makes VC do the right thing when new *rules* are introduced, but that's a lot less common than new *files* being introduced, and also more obvious (in the sense that the included file is setting variables that the builder doesn't know what to do with).
-Daniel *This .sig left intentionally blank*