Xcopy doesn't work when in makefile

I ran into an error [copyResources] Error 4

when trying to create a project that I downloaded on a 64-bit installation of Windows 7. In the Makefile Qt is generated, it contains the following two lines:

copyResources:
    xcopy "D:\Downloads\GraphViz\GraphViz\res" "D:\Downloads\GraphViz\build-GraphViz-Desktop_Qt_5_3_MinGW_32bit-Debug" /e /y 

      

Make failed to achieve this target with an error Invalid number of parameters

. I originally assumed the command was wrong, but if I run it on the command line, it works fine. Even a stranger if I copy and paste this exact command in xcopycall.bat

and change the Makefile to the following

copyResources:
    xcopycall

      

then everything works fine. Going to /

doesn't help, so it's not an escaping issue. Why run it from a batch file and not a Makefile to fix this?

+3
qt makefile xcopy qmake


source to share


No one has answered this question yet

Check out similar questions:

1124
What is the purpose of .PHONY in a makefile?
540
What is the difference between the variable assignments of the GNU Makefile = ,? = ,: = AND + =?
385
xcopy file, rename, suppress message "Does xxx specify file name ..."
361
What do the makefile symbols $ @ and $ <mean mean?
113
What's wrong when Visual Studio tells me "xcopy finished with code 4"
3
CodeBlocks: how to run after build from custom Makefile
2
XCopy error during build but not from command line?
1
Why doesn't TFS Build recognize xcopy as a command?
0
Python subprocess call subprocess
0
Incorrect command syntax. Makefile: 2: recipe for target "..." failed



All Articles
Loading...
X
Show
Funny
Dev
Pics