我在Windows下使用Makefile,make版本:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
我需要在Makefile中使用scp命令将编译好的可执行文件拷贝至远程服务器,下面是Makefile内容:
.PHONY: build
build:
scp prog.out root@192.30.145.8:/root/.cache/
这段Makefile在Linux上可以正确运行,在Windows下报错,报错内容如下:
ssh: Could not resolve hostname 192.30.145.8;c: Name or service not known
lost connection
make: *** [build] Error 1
大概问题在Makefile对冒号的转义,但不知道具体怎么写才可以在Windows下运行