Windows的git-slave

时间:2012-09-10 07:50:38

标签: windows git git-slave

git-slave文档仅对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."

当我尝试下载并运行'nmake install'时,我得到同样神秘的错误:

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

有没有人有这方面的经验,可以指出我正确的方向?

2 个答案:

答案 0 :(得分:4)

git-slave的Makefile只与GNU Make一起使用 - 因为它是一个相当简单的makefile,没有理由它也不适用于Microsoft nmake,除了“免费”使用Make扩展Microsoft nmake不支持。 (How similar/different are gnu make, microsoft nmake and posix standard make?对差异有很好的总结)。

在gitslave / Makefile的第2-4行,如果用$(前缀)替换$ {prefix}而用$(mandir)替换$ {mandir} [基本上用括号替换括号(括号)] nmake应该不再扼流在Makefile上。但是,除非您安装了一堆POSIX实用程序或允许mkdir -prm -fsed等命令工作的东西,否则修复nmake不兼容性只允许(充其量){ {1}}工作。

没有任何gitslave开发人员可以定期(?)访问Windows开发机器,因此文档说:“我们接受错误修正,[但不要] [声明]您可以make testcheck安装或检查, 或者在这个平台上进行QAed。“

我想在Windows上使用git-slave的其他人确保Perl和gitslave以及gitslave所依赖的任何POSIX实用程序(例如grep和rm)都安装在PATH的某个地方。

答案 1 :(得分:1)

在Windows上,您可以下载并安装免费的unix工具包,包括所有必需的程序: https://sourceforge.net/projects/unxutils/

你还需要一个perl工具包,因为" pod2man"用于制作过程。 此外,剧本" gits"是一个perl脚本,在* ix下运行,因为" she-bang"第一行中的说明("#!/ usr / bin / perl") - 这不适用于Windows。

我创建了一个小包装器批处理脚本,它使用我的perl启动原始脚本: gits.bat: perl gits%*

希望这有帮助。