summaryrefslogtreecommitdiff
path: root/rules.ninja
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-04-10 02:58:52 -0700
committerMichael Forney <mforney@mforney.org>2016-04-15 02:10:08 -0700
commitdbb513d4572e2eed5e540b7b7fb7e9c8f544cb04 (patch)
tree2260140732591d6ca455e493305884c21f063b3f /rules.ninja
parent5f753e71fa37011b9bf7bcec482fe4a4a904dc9e (diff)
Add some initial packages
Diffstat (limited to 'rules.ninja')
-rw-r--r--rules.ninja35
1 files changed, 35 insertions, 0 deletions
diff --git a/rules.ninja b/rules.ninja
new file mode 100644
index 00000000..c49bc90b
--- /dev/null
+++ b/rules.ninja
@@ -0,0 +1,35 @@
+rule gen
+ command = rc $in -d $root_srcdir $$PWD
+ generator = 1
+
+# toolchain
+rule cc
+ command = $cc $cflags -c -o $out $in
+
+rule link
+ command = $cc $ldflags -o $out $in
+
+rule ar
+ command = $ar crsD $out $in
+
+rule stamp
+ command = touch $out
+
+rule copy
+ command = ln -f $in $out
+
+# misc tools
+rule yacc
+ command = oldpwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldpwd/$in
+
+rule sed
+ command = sed $expr >$out.tmp $in && mv $out.tmp $out
+
+rule githash
+ command = rc $root_srcdir/scripts/hash.rc $repo $out $args $in
+
+rule gittree
+ command = rc $root_srcdir/scripts/tree.rc $repo $out $in
+
+rule gitinit
+ command = mkdir -p $repo && git -C $repo init --bare && touch $out