Merge branch 'rs/opt-help-text'
[git/kirr.git] / contrib / buildsystems / generate
blobbc10f25ff24a74268c2995e5fa9e8d878c66bf14
1 #!/usr/bin/perl -w
2 ######################################################################
3 # Generate buildsystem files
5 # This script generate buildsystem files based on the output of a
6 # GNU Make --dry-run, enabling Windows users to develop Git with their
7 # trusted IDE with native projects.
9 # Note:
10 # It is not meant as *the* way of building Git with MSVC, but merely a
11 # convenience. The correct way of building Git with MSVC is to use the
12 # GNU Make tool to build with the maintained Makefile in the root of
13 # the project. If you have the msysgit environment installed and
14 # available in your current console, together with the Visual Studio
15 # environment you wish to build for, all you have to do is run the
16 # command:
17 # make MSVC=1
19 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
20 ######################################################################
21 use strict;
22 use File::Basename;
23 use Cwd;
25 my $git_dir = getcwd();
26 $git_dir =~ s=\\=/=g;
27 $git_dir = dirname($git_dir) while (!-e "$git_dir/git.c" && "$git_dir" ne "");
28 die "Couldn't find Git repo" if ("$git_dir" eq "");
29 exec join(" ", ("PERL5LIB=${git_dir}/contrib/buildsystems ${git_dir}/contrib/buildsystems/engine.pl", @ARGV));