I'm looking for the best practice for including GNU Bash in the cross-compilation of NetBSD using the build.sh script. Right now, my plan is to include it in usr/src/gnu/dist and then create the relevant Makefiles in usr/src/gnu/usr.bin but I was wondering if there was an easier/better way to do this?
-
1So, there are two ways available (ended up going with a third way that doesn't apply here). The first, as mentioned in the question is to include it in usr/src/gnu/dist under the NetBSD source tree. However, the tools that appear here seem to be used mainly for a cross-compile. The second option is placing it in the extsrc tree under the correct license (gnu, obviously). This option is a bit easier since there isn't as much shoehorning in regards to the Makefiles. – Matthew May 06 '11 at 13:44
1 Answers
The new way is to place files under src/external//. For bash, it's src/external/gpl3/bash. (This directory is called ${EXTTOPDIR.bash} hereafter.)
The original source is expanded into ${EXTTOPDIR}/dist as is. Other files and directories are made at ${EXTTOPDIR}. Start with copying src/external/gpl2/xcvs for example. (BSD) makefiles that are placed (out of the original source) are called "reach-over"; meaning that build procedures are kept without disturbing the original source. This helps to ease maintaining of the original source. (And no, all of these are not documented at all, unfortunately.)
If you need to hook the build as "tools", you'll need something more to care. The procedure is also not documented. Just learn from the source.
If you work on the official NetBSD tree, you have something more to learn about CVS; use vendor branch, etc.
HTH, Masao

- 46
- 4