]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/Makefile
make yacc usage POSIX compatible
[mirror_iproute2.git] / tc / Makefile
index 14171a28cba5d2bfeb5b1af4b713279c668859d2..a378c403a6a576a18edec9cd9f4a73ac9f92c904 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 TCOBJ= tc.o tc_qdisc.o tc_class.o tc_filter.o tc_util.o tc_monitor.o \
        tc_exec.o m_police.o m_estimator.o m_action.o m_ematch.o \
-       emp_ematch.yacc.o emp_ematch.lex.o
+       emp_ematch.tab.o emp_ematch.lex.o
 
 include ../config.mk
 
@@ -125,7 +125,6 @@ ifneq ($(IPT_LIB_DIR),)
        CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
 endif
 
-YACC := bison
 LEX := flex
 CFLAGS += -DYY_NO_INPUT
 
@@ -158,8 +157,8 @@ install: all
        fi
 
 clean:
-       rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \
-       rm -f emp_ematch.yacc.*
+       rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
+       rm -f emp_ematch.tab.*
 
 q_atm.so: q_atm.c
        $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
@@ -178,8 +177,8 @@ ifeq ($(TC_CONFIG_XT),y)
   LDLIBS += $$($(PKG_CONFIG) xtables --libs)
 endif
 
-%.yacc.c: %.y
-       $(QUIET_YACC)$(YACC) $(YACCFLAGS) -o $@ $<
+%.tab.c: %.y
+       $(QUIET_YACC)$(YACC) $(YACCFLAGS) -p ematch_ -b $(basename $(basename $@)) $<
 
 %.lex.c: %.l
        $(QUIET_LEX)$(LEX) $(LEXFLAGS) -o$@ $<
@@ -187,7 +186,7 @@ endif
 # our lexer includes the header from yacc, so make sure
 # we don't attempt to compile it before the header has
 # been generated as part of the yacc step.
-emp_ematch.lex.o: emp_ematch.yacc.c
+emp_ematch.lex.o: emp_ematch.tab.c
 
 ifneq ($(SHARED_LIBS),y)