Calling Windows commands (e.g. del) from a GNU makefile

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-03-17T14:29:04Z Indexed on 2010/03/17 14:31 UTC
Read the original article Hit count: 139

Filed under:
|

It does not appear to be possible to call Windows system commands (e.g. del, move, etc) using GNU Make.

When the following rule is run, an error is reported del: command not found:

clean:
   del *.o

This is presumably because there is no such execuatable as "del". I've also tried running it as an option to cmd but with this only seems to open a new prompt:

clean:
    cmd /C del *.o

I'm using GNU Make 3.79.1 that is bundled as part of MSys.

© Stack Overflow or respective owner

Related posts about makefile

Related posts about Windows