Summary Files Commits Branches @commit @diff @stats
path: root / std / builder
diff options
context:
space:
mode:
2 files changed, 31 insertions, 0 deletions
-rw-r--r--std/builder/builder.ucx25
-rw-r--r--std/builder/builder_rust.ucx6
diff --git a/std/builder/builder.ucx b/std/builder/builder.ucx
new file mode 100644
index 0000000..b5e00b0
--- /dev/null
+++ b/std/builder/builder.ucx
@@ -0,0 +1,25 @@
+name := builder
+#-- do
+if [ -f "$(Xpath $SELF.src)" ]
+then
+ while read -r src
+ do
+ case "$src" in
+ (*.git|git:*) git clone $src ;;
+ (*) wget $src
+ esac
+ done <"$(Xpath $SELF.src)"
+fi
+if [ -f "$(Xpath $SELF.build)" ]
+then
+ /bin/sh $(Xpath $SELF.build)
+else
+ make
+fi
+if [ -f "$(Xpath $SELF.install)" ]
+then
+ /bin/sh $(Xpath $SELF.install)
+else
+ mkdir /out
+ PREFIX=/out make install
+fi
diff --git a/std/builder/builder_rust.ucx b/std/builder/builder_rust.ucx
new file mode 100644
index 0000000..3cc5f76
--- /dev/null
+++ b/std/builder/builder_rust.ucx
@@ -0,0 +1,6 @@
+name := builder_rust
+import := builder
+#-- build
+cargo build
+#-- install
+cargo install