On Mon, Apr 29, 2013 at 4:34 PM, Paul Smith <psm...@gnu.org> wrote: > Plus on UNIX any extension is acceptable since we're using dlopen() > (even with the normal linker you can give any library name you want, > it's only the -l flag that makes assumptions). Maybe someone wants to > write pattern rules to build their GNU make loadable objects with a > suffix ".gmkso" to distinguish it (and use a different rule) from > building normal .so shared objects. > > I want to be sure the benefits outweight the loss of flexibility before > we go down that path.
Why not try opening the pathname as given, and if that fails append the platform-standard extension and try again? > It's probably a good idea to have make predefine a variable containing > the "host" architecture, to avoid the need for uname. We currently have > an internal variable "make_host" which is the GNU autoconf --host value > on systems where configure runs, and the various config.h templates have > hardcoded values. Maybe we could do something with this (just using the > --host value might be too arbitrary, I'd have to look at the options). I've twice submitted a patch to provide make_host as a make variable, but they've gone into the ether. It's a one-line patch and hugely useful IMHO considering the number of people who've had to reinvent the $(if $(shell uname)) etc wheel. It's impossible to determine how a given user or community will define "platform", so no variable will work for everybody, but I think make_host is pretty hard to improve upon. -David _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make