ref: 066f0810629c611e33869a30ec967e4f559b9f88
parent: b76e8ecc732cb311ceee6fd6c807b7e784d3fe31
author: cinap_lenrek <[email protected]>
date: Mon Sep 16 13:39:20 EDT 2019
rebind: handle cwd, create $objtype/^(bin lib) directories in repo root instead of /tmp (for cross compile) make the rebind script work regardless of the current working directory. fixes "Local" plumb trick. we have to separate the binaries and lib archives for different architectures. otherwise cross compiling becomes a pain. this change creates $objtype/bin/... and $objtype/lib/... directories in the root of the repository and will then bind over the system directories as needed.
--- a/rebind
+++ b/rebind
@@ -1,13 +1,23 @@
#!/bin/rc
-mkdir -p /tmp/bin/X11
-mkdir -p /tmp/lib/ape/X11
+d=`{basename -d $0}
-bind -ac sys/lib/ape/ /sys/lib/ape
-bind -ac sys/src/ape/lib /sys/src/ape/lib
-bind -ac sys/src/ape/ /sys/src/ape/
-bind -ac sys/include/ape/ /sys/include/ape
-bind -ac sys/src/ape/X11/cmd/X/ /n/X
+mkdir -p $d/$objtype/lib/ape/X11/
+mkdir -p $d/$objtype/bin/X11/
-bind -ac /tmp/lib/ape /$objtype/lib/ape
-bind -ac /tmp/bin/X11/ /$objtype/bin/X11
+bind -b $d/sys/lib/ape/ /sys/lib/ape/
+
+bind -a $d/sys/src/ape/ /sys/src/ape/
+
+bind -b $d/sys/src/ape/lib/ /sys/src/ape/lib/
+
+bind $d/sys/src/ape/X11/ /sys/src/ape/X11/
+
+bind -b $d/sys/include/ape/ /sys/include/ape/
+
+bind -c $d/sys/src/ape/X11/cmd/X/ /n/X/
+
+bind -bc $d/$objtype/lib/ape/ /$objtype/lib/ape/
+bind -bc $d/$objtype/bin/ /$objtype/bin/
+
+bind -b $d/$cputype/bin/ /bin/