Building openwrt on FreeBSD requires the linux version of certain
commands (currently patch ang getopt) instead of the FreeBSD version.
This patch addressed the problem by creating a temporary directory
with links to the commands involved, and putting it in the search
path before the standard paths.
At the moment i do that in the BSDMakefile, though Makefile
would be a better place (using a similar approach and a conditional)
cheers
luigi
Index: BSDmakefile
===================================================================
--- BSDmakefile (revision 16744)
+++ BSDmakefile (working copy)
@@ -3,5 +3,15 @@
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-world ${.TARGETS}:
- @gmake $@
+# To build under *BSD we need the linux version of some commands to come
+# before the BSD version in the search path. tmp/bsdenv creates
+# the required directory and sets the environment as needed.
+
+world ${.TARGETS}: tmp/bsdenv
+ @(PATH=`pwd`/tmp/bin:${PATH} ; gmake $@ )
+
+tmp/bsdenv:
+ mkdir -p tmp/bin
+ ln -s /usr/local/bin/gpatch tmp/bin/patch
+ ln -s /usr/local/bin/getopt tmp/bin/getopt
+ touch tmp/bsdenv
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel