Date: Mon, 11 Feb 2019 09:10:48 +0100 From: Martin Husemann <mar...@duskware.de> Message-ID: <20190211081048.ga16...@mail.duskware.de>
| Make the makefile define that depending on LDSTATIC being defined/empty? | That would also cover the MKDYNAMICROOT=no case (I think). I currently have: .if (!defined(MKPIC) || ${MKPIC} != "no") && \ (!defined(LDSTATIC) || ${LDSTATIC} == ${LDSTATIC:S/-static//}) .-include "${NETBSDSRCDIR}/lib/libedit/shlib_version" .if defined(major) CPPFLAGS+= -DDEFERRED_LIBS='"libedit.so.${major}"' .else CPPFLAGS+= -DDEFERRED_LIBS='"libedit.so"' .endif .else LDADD+= -ledit -lterminfo DPADD+= ${LIBEDIT} ${LIBTERMINFO} .endif Whenever that falls into the .else case it will build/link just the same as it has done for the past several years, only in the other case is there a change. This digs the libedit major number out of the libedit source dir, which should be what we want (building sh needs NETBSDSRCDIR to be available in any case - at least parts of it) - should there be no major number available it will fall back to the "accept any version and hope" strategy, as this should never happen on any real build, only if someone is playing around (do it should be OK, you'll get whatever libedit is installed when the build was done, provided it is not changed later). Still no path for it however. This looks to be doing the right thing for building /rescue/sh which with this is back to having history & editing support. Still don't know whether this is worth continuing with however. kre