This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XFree 4.2.1 + fontconfig-2


On Fri, Sep 27, 2002 at 07:40:44 +0200, Alexander Gottwald wrote:
> Alexander Gottwald wrote:
> 
> > #if Concat(SharedLib,libname)
> > #define LibraryTargetName(libname) Concat3(lib,libname,.dll.a) 
> > #else
> > #define LibraryTargetName(libname) Concat3(lib,libname,l.a) 
> > #endif
> > 
> > But I don't know if this is either valid for imake or if it will
> > break anything. And when you do a shared and a static version, the
> > static version will most likely be name libName.dll.a too. 
> 
> I just checked and the above violates the cpp syntax. You can not have a
> macro with a conditional which depends on a parameter.
> 
> |#define MACRO(x)
> |#if x 
> |#define RESULT YES
> |#else
> |#define RESULT NO
> |#endif
> 
> does not work. The preprocessor can not decide which one will be used later.
> Those preprocessor macros are not functions.
> 
> What does this mean for us? Imagine you have libX11 as shared library and
> eg. libXt as static library (current configuration). 
> 
> a dependency like this
> | program: LibraryTargetName(X11) LibraryTargetName(Xt) 
> which we want to resolve to
> | program: libX11.dll.a libXt.a 
> is not possible. We'd have to build something like this
> | #if SharedLibraryX11
> | #define X11lib SharedLibraryTargetName(X11)
> | #else
> | #define X11lib LibraryTargetName(X11)
> | #endif
> | ...
> | program: $(X11lib) $(Xtlib)
> and this must be done for all the code.
> 
> My conclusion: We should stay with libName.a even for import libraries. 
> Changing it and don't being able to build a simple macro which wraps it
> properly will sooner ar later cause compile problems.
> 
> comments?

Yes,

The following will work....

Instead of

program: $(X11lib) $(Xtlib) 

Do this

DONE: $(X11lib) $(Xtlib)

and at the end of the SharedLibraryTarget() stuff and other same 
functions do this

	> DONE

Which will touch a file called DONE and that's the dependency.

Alan.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]