bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82)


From: Tim Murphy
Subject: Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82)
Date: Mon, 29 Apr 2013 20:40:46 +0100




On 29 April 2013 20:12, Eli Zaretskii <address@hidden> wrote:
> Date: Mon, 29 Apr 2013 18:19:09 +0100
> From: Tim Murphy <address@hidden>
> Cc: "Paul D. Smith" <address@hidden>, "address@hidden" <address@hidden>
>
> > 2. The fact that the dynamic object's file extension (.so) is exposed
> >    to the Makefile is unfortunate, because it will hurt portability of
> >    Makefiles: the extension on Windows is .dll.  Can we omit the
> >    extension and append it internally?
> >
>
> "load" allows one to build the plugin from within the makefile so you have
> to deal with platform specific problems right there.

How can one deal with them?  The underlying OS is not easily
detectable by Make.

the same way one creates 1 makefile that can build the same code for 2 operating systems - something done every day.  You make it up. You run uname with $(shell) or you pass in an argument from a top level script that does know the platform or whatever.   In the end you have a bit of makefile that says:

foo.dll: foo.obj
   .....
load foo.dll

or

foo.so: foo.o
   ....
load foo.so


SYSTEM:=$(shell uname -s)
perhaps one has to say
ifeq ($(SYSTEM),)   # assume windows

foo.dll: foo.obj
   .....
load foo.dll

else

foo.so: foo.o
   ....
load foo.so

endif

Regards,

Tim


--
You could help some brave and decent people to have access to uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]