On 29 April 2013 20:12, Eli Zaretskii <e...@gnu.org> wrote:

> > Date: Mon, 29 Apr 2013 18:19:09 +0100
> > From: Tim Murphy <tnmur...@gmail.com>
> > Cc: "Paul D. Smith" <psm...@gnu.org>, "bug-make@gnu.org" <
> bug-make@gnu.org>
> >
> > > 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/
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to