4

git-slave documentation only has the following not-so-helpful comment regarding installation on Windows:

* Limited windows support

Multiple users have been successful in using gitslave with Windows.
This is "supported" only in the sense that people have reported it to
work and we accept bugfixes, not that you can `make` install or check,
or that it is QAed on this platform prior to release."

When I try to download and run 'nmake install' I get the equally cryptic error:

makefile(2) : fatal error U1001: syntax error : illegal character '{' in macro 
Stop.

Does anyone have any experience with this and can point me in the right direction?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
yotuina
  • 65
  • 4

2 Answers2

4

The Makefile for git-slave has only been used with GNU Make - as it is a rather simple makefile, there is no reason it shouldn't work with Microsoft nmake as well, except for "gratuitous" use of Make extensions that are not supported by Microsoft nmake. ( How similar/different are gnu make, microsoft nmake and posix standard make? has a good summary of the differences).

On lines 2-4 of gitslave/Makefile, if you replace ${prefix} with $(prefix) and ${mandir} with $(mandir) [essentially replace braces with parentheses (brackets)] nmake should no longer choke on Makefile. However, unless you have installed a bunch of POSIX utilities or something that allows commands like mkdir -p, rm -f, and sed to work, fixing the nmake incompatibility would only allow (at best) make testcheck to work.

None of the gitslave developers have regular(?) access to Windows development machines, so like the documentation says: "we accept bugfixes, [but do] not [claim] that you can make install or check, or that it is QAed on this platform."

I imagine that the other people who have used git-slave on windows just made sure that Perl and gitslave and any POSIX utilities that gitslave depends on (e.g. grep and rm) are installed somewhere in PATH.

Community
  • 1
  • 1
Alex Dupuy
  • 5,984
  • 3
  • 39
  • 35
  • +1, but don't you get GNU make and Perl with msysgit's standard install? It could be a better solution than to use NMake – CharlesB Sep 11 '12 at 06:01
  • apart from the use of ${name} syntax in the makefile, there are no apparent GNU make dependencies; the utilities provided by msysgit should provide all of the necessary POSIX utilities (Perl, sh, rm, grep) that gitslave requires, and the docs should be clarified that msysgit is recommended (required?) for a Windows install – Alex Dupuy Sep 12 '12 at 14:48
1

On Windows you can download and install the free unix tool kit including all necessary programs: https://sourceforge.net/projects/unxutils/

You also need a perl tool kit because "pod2man" is used in the make process. Furthermore the script "gits" is a perl script which runs under *ix because of the "she-bang" instruction in the first line ("#!/usr/bin/perl") - this doesn't work on Windows.

I created a small wrapper batch scripts that uses my perl to start the original script: gits.bat: perl gits %*

Hope this helps.

Christoph
  • 21
  • 6