makefile - mingw32-make + mklink... just not getting along? -
not sure if else has gotten work, i'm having no end of trouble following simple line in makefile running mingw32-make
:
mklink mk makefile
the following created link, mingw32-make
puked , threw error 255 thereafter:
$(shell cmd /c 'mklink mk makefile')
nothing else problematic, , have relatively complex makefile. mklink
doing this. (apparently msys has it's own problems ln
going down path appears pointless.)
the following works me, (on win7 home premium, in virtualbox), provided invoke in shell running administrator privilege:
$ cat makefile.tst all: cmd /c "mklink mk makefile.tst" @echo "success!" $ make -f makefile.tst cmd /c "mklink mk makefile.tst" symbolic link created mk <<===>> makefile.tst success! $ rm mk $ mingw32-make -f makefile.tst cmd /c "mklink mk makefile.tst" symbolic link created mk <<===>> makefile.tst success!
my shell, in case msys sh.exe
, invoked via msys.bat
cmd.exe
uac escalation administrator privilege. can show mklink
command works both in msys' own make.exe
, , in mingw32-make.exe
; (of course, mingw32-make.exe
example works directly elevated cmd.exe
shell itself).
i suspect attempting use mklink
directly within makefile, without cmd /c
preamble, may not work because mklink
cmd.exe
built-in, gnu make may not know run way ... reports createprocess
failure, because specified file cannot found, when try it.
your use of make's $(shell ...)
construct not work, because causes make invoke command in wrong phase of operation ... when parsing makefile itself, , constructing dependency graph, rather command run when containing rule invoked, attempt execute output $(shell ...)
command command in own right; not want!
Comments
Post a Comment