summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 3b4277e5ab..afe487536b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -177,6 +177,28 @@ $(foreach m, $(notdir $1), \
$(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
endef
+# LEX
+# ---------------------------------------------------------------------------
+quiet_cmd_flex = LEX $@
+ cmd_flex = $(LEX) -o$@ -L $<
+
+$(obj)/%.lex.c: $(src)/%.l FORCE
+ $(call if_changed,flex)
+
+# YACC
+# ---------------------------------------------------------------------------
+quiet_cmd_bison = YACC $@
+ cmd_bison = $(YACC) -o$@ -t -l $<
+
+$(obj)/%.tab.c: $(src)/%.y FORCE
+ $(call if_changed,bison)
+
+quiet_cmd_bison_h = YACC $@
+ cmd_bison_h = $(YACC) -o/dev/null --defines=$@ -t -l $<
+
+$(obj)/%.tab.h: $(src)/%.y FORCE
+ $(call if_changed,bison_h)
+
# Shipped files
# ===========================================================================