diff options
| author | Michael Forney <mforney@mforney.org> | 2016-04-14 00:21:44 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-04-15 02:10:08 -0700 |
| commit | 20a3b2ad4421763e4b19d7897cc5addecf06898d (patch) | |
| tree | ecc00da23403820c355f5ff81f9da2ae8531f466 /rules.ninja | |
| parent | b3a4eb3f51f308a1d7fdde8a7cf77f4b8df2f308 (diff) | |
Allow independent generation of ninja files
Diffstat (limited to 'rules.ninja')
| -rw-r--r-- | rules.ninja | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/rules.ninja b/rules.ninja index 43e84027..7fc28808 100644 --- a/rules.ninja +++ b/rules.ninja @@ -1,5 +1,5 @@ rule gen - command = rc $in -d $root_srcdir $$PWD + command = rc ./setup.rc -n -b $builddir $srcdir generator = 1 # toolchain @@ -14,13 +14,16 @@ rule link rule ar command = $ar crsD $out $in +# misc tools rule stamp command = touch $out rule copy command = ln -f $in $out -# misc tools +rule cat + command = cat $in >$out.tmp && mv $out.tmp $out + rule yacc command = oldpwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldpwd/$in @@ -28,14 +31,14 @@ rule sed command = sed $expr >$out.tmp $in && mv $out.tmp $out rule githash - command = rc $root_srcdir/scripts/hash.rc $repo.git $out $args $in + command = rc ./scripts/hash.rc $builddir/$repo.git $out $args $in rule gittree - command = rc $root_srcdir/scripts/tree.rc $repo.git $tag $in + command = rc ./scripts/tree.rc $builddir/$repo.git $tag $in restat = 1 rule gitarchive - command = git -C $repo.git archive -o $$PWD/$out $tag + command = git -C $builddir/$repo.git archive -o $$PWD/$out $tag rule gitinit - command = mkdir -p $repo.git && git -C $repo.git init --bare && touch $out + command = mkdir -p $builddir/$repo.git && git -C $builddir/$repo.git init --bare && touch $out |
