The main practical difference between the two makes, the MSYS version and the native version, is that former uses the MSYS shell to execute its commands, while the later uses cmd
. This means with the MSYS version of make you can write recipes much the same as you would on Unix or Linux system, while with the native Windows version you might have to do things differently. For simple command execution they work the same, but for more complicated actions the recipes will have to differ because cmd
has a much different syntax than Unix shells.
For example you might handle recursive builds like this with MSYS make:
recurse-subdirs:
for i in $(SUBDIRS); \
do \
cd $$i && make all || exit; \
done
While with the native version of make you'd have to do something like this instead:
recurse-subdirs: FORCE
for %%i in ($(SUBDIRS)) do \
cd %%i && make all || exit
With the MSYS make its also safe to assume the usual Unix commands are available (eg. rm *.o
), while with the native make you'll want to use Windows commands instead (eg. del *.o
).
Which version of make is available is dependent on how you set the PATH
. If both versions of make, one named make
, and one named mingw32-make
, can be found by searching PATH
then both commands will be available. This true whether you're using the MSYS shell or cmd
.