Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MPC: exclude 'files' in .mwc file

51 views
Skip to first unread message

Stefan Naewe

unread,
Jun 3, 2010, 5:01:31 AM6/3/10
to
Hi there!

We use MPC to generate Makefiles/Project files for Linux and VS8.
We have a .mwc file that incudes .mpc files from different sub-
projects:

workspace {
../proj1/proj1.mpc
../proj2/proj2.mpc
.....
}

All Project/Makefiles are generated by a single invocation of
'mwc.pl ... -type make -type vc9 workspace.mwc'.
Everything's OK so far.

Now the question:

All sub-projects are cross-platform except for one, which can only be
built on Win32.
Is it possible to exclude that single .mpc file without using two
different .mwc files?
Something like the 'specific' keyword but inside the workspace file ?

Thanks in advance

Stefan

Andrew

unread,
Jun 8, 2010, 7:34:53 AM6/8/10
to
On 3 June, 09:01, Stefan Naewe <stefan.na...@googlemail.com> wrote:

> All sub-projects are cross-platform except for one, which can only be
> built on Win32.
> Is it possible to exclude that single .mpc file without using two
> different .mwc files?
> Something like the 'specific' keyword but inside the workspace file ?
>
> Thanks in advance

I've not found any way to do this. That doesn't mean there isn't one,
of course. But what I do until I find a better way is arrange the
contents of the cpp file so it looks like this:

#ifdef WIN32
: what you first thought of....
#endif

Note that I use WIN32 rather than _WIN32, the macro set by the
Microsoft compiler. If your project does not already set this macro
then IMO it should. This allows the code to be specific to WIN32 but
not to the Microsoft compiler (for which I use _MSC_VER).

Regards,

Andrew Marlow

0 new messages