But it seems quite reasonable what Stephane said - that #ifdef are
going
to be mostly used to make a difference between GNU/GNUstep and
NeXT/Cocoa,
and so would be required no matter what make system is used to build
on
Cocoa.
So I interpret you correctly we should to something like:
#ifndef __AppKitDefines_INCLUDE
#define __AppKitDefines_INCLUDE
#ifdef APPKIT_WITH_DLL || GNUSTEP_WITH_DLL <---------
#if BUILD_libgnustep_gui_DLL
# define APPKIT_EXPORT __declspec(dllexport)
# define APPKIT_DECLARE __declspec(dllexport)
#else
# define APPKIT_EXPORT extern __declspec(dllimport)
# define APPKIT_DECLARE __declspec(dllimport)
#endif
#else /* GNUSTEP_WITH[OUT]_DLL */
# define APPKIT_EXPORT extern
# define APPKIT_DECLARE
#endif
#endif /* __AppKitDefines_INCLUDE */
As this seems to be what would be needed to support this issue of
Apple's build system.
Thanks David for the example - interesting point - I was assuming that
Stephane would be using Project Builder on Apple only, and that on
Windows
you would always be using GNUstep.
If it's so, then
#ifdef GNUSTEP_WITH_DLL
...
#else
...
#endif
is enough (GNUSTEP_WITH_DLL would only be defined on Windows when
compiling using GNUstep, and not in all other cases). If not ... well
yes
that might complicate things, and I'd be less favourable to see the
OSX PB
support in there. :-)
At the moment I think maintaining two separate build systems seems the
main issue to me. That was a very good remark, and we must be very
clear
about which one is the `officially supported/recommended' way of
building.
But my suggestion - as a very general principle - is to try to address
and
support other users' requests for integration/porting (if those
requests
don't compromise the project's design and aims). It's part of an
'open',
'free' philosophy after all. :-)
I personally don't like PBX, and would really prefer to stick with
GNUmakefiles as our main building system. But that does not have to
be a
religious crusade. I don't see any major disruption to our headers in
saying Stephane can build on PBX, and distribute PBX project files to
build stuff on PBX, so (with the clause the GNUmakefiles are the
official
build system, that they must always be kept updated etc) I'd support
it.
Maybe as separate files (distributed separately) if you so prefer.