views:

185

answers:

2

Using ant I could unzip an archive before proceeding with the build per-se ... Is this possible using nmake ? Could I call an external application ? Or even a batch script ?

A: 

You can call an external application from nmake Makefiles, just as from any other Makefile.

However, what to call? You'll need to have WinZip command line tools or something installed, right?

I'd recommend looking at SCons. It is a wonderful build engine, fully supports Windows and MSVC++, and has unzipping built in.

akauppi
+2  A: 

Any variant on make has the ability to perform any task that can be done from the command line. Indeed, most of the build functionality of any makefile is going to depend upon the onvocation of external processes such as the compiler, linker, librarian, etc. The only downside to make is that there are so many variations of syntax (nmake, borland make, GNU make, etc.) that make it practically impossible to write a single cross-platform makefile.

In answer to your particular question consider the following:

main.cpp: archive.zip
        unzip archive.zip

This basically states that main.cpp depends upon archive.zip and states that this dependency can be satisfied by invoking the "unzip" command.

Jon Trauntvein
Our sources are splitted in directories , and for each one we have a separate makefile . I tried adding commands to them , but they don't get executed. Any hints?
Vhaerun