On 15 Sep 2013, at 16:47, Stephen Leake <[email protected]> wrote:
> Simon Wright <[email protected]> writes: > >> I've attached a makefile snippet that sets OS appropriately (and >> includes some explanation). > > I'm puzzled. "OS" is only defined by default on Windows, so why use that > at all? Well, why not? Though your suggestion of working from GPRBUILD_TARGET is better for the immediate use, I was looking at something more general; but let's solve _this_ problem. > The specific problem is picking the name for the dynamic library; that > depends on the OS. Did you find some gpr syntax that lets you set the > Library_Name from the OS string? I think you will need to set an > external variable to the actual library name fragment. Something like > this in the makefile (not tested): > > ifeq ($(findstring mingw,$(GPRUILD_TARGET)) > dyn_lib_fragment := dll > else ifeq ($(findstring darwin,$(GPRUILD_TARGET)) > dyn_lib_fragment := dynlib > else ifeq ($(findstring linux,$(GPRUILD_TARGET)) > dyn_lib_fragment := so > else > is there a way to generate a make error? > endif It would be dylib … but that would be the general idea. else $(error "Don't know file extension for dynamic libs on $(GPRBUILD_TARGET)") > >>>> On Mac OS X it's important to build shared libraries with gprbuild, >>>> not gnatmake, because only gprbuild knows how to do it properly. Is >>>> there a reason you use gnatmake for this? >>> >>> No; feel free to change it. >> >> I need to revisit MTN :-) > > I don't think you have write privs on this branch; I meant "edit it > locally and report results/propose a patch". Which I think you are > implying is what you did. Pretty sure I would have privs, but that my registration on the server has got lost (at the same time as the host key changed?) so I can no longer sync. I've asked Ludo to have a look at this. Anyway, I can do as you say (I was holding off until I had synced). > I guess just changing 'gnatmake' to 'gprbuild' is all that is needed? Yes. _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
