Use bison(1) if yacc(1) is not available

This commit is contained in:
Jeremy Brubaker 2021-11-30 10:27:07 -05:00
parent ce65ff30c7
commit a4ed70be42

View File

@ -24,13 +24,15 @@ LDFLAGS+= `${PKG_CONFIG} --libs x11 xft xrandr`
MANPREFIX?= ${PREFIX}/share/man
YACC= $(if $(shell command -v yacc >/dev/null),yacc,bison --yacc)
all: ${PROG}
clean:
rm -f ${OBJS} ${PROG} y.tab.c
y.tab.c: parse.y
yacc parse.y
$(YACC) parse.y
${PROG}: ${OBJS} y.tab.o
${CC} ${OBJS} ${LDFLAGS} -o ${PROG}