summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-04-16 02:04:12 -0700
committerMichael Forney <mforney@mforney.org>2016-04-16 02:04:12 -0700
commit22e7f1a6de75218591090a2ca86c60fdfad7715c (patch)
tree19a7e549299ef3b0d4020dfe4686472f52486ecc
parent00b7a0a40be589731b43df4934108f628a407f6b (diff)
Add lex rule
-rw-r--r--config.ninja1
-rw-r--r--rules.ninja3
2 files changed, 4 insertions, 0 deletions
diff --git a/config.ninja b/config.ninja
index e950ab13..e595f0a0 100644
--- a/config.ninja
+++ b/config.ninja
@@ -7,6 +7,7 @@ cflags = -O2 -march=native -pipe
ldflags = -static
zic = zic
+lex = lex
yacc = yacc
python = python
perl = perl
diff --git a/rules.ninja b/rules.ninja
index a77e011f..a8c9127d 100644
--- a/rules.ninja
+++ b/rules.ninja
@@ -24,6 +24,9 @@ rule copy
rule cat
command = cat $in >$out.tmp && mv $out.tmp $out
+rule lex
+ command = $lex -t $in >$out.tmp && mv $out.tmp $out
+
rule yacc
command = oldcwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldcwd/$in