Skip to content

Commit

Permalink
fall back to the checked-in copy of ragel .c files if ragel is not av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
arekinath committed Feb 11, 2024
1 parent 7e440a4 commit 512ec6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,15 @@ ifneq ($(SYSTEM), OpenBSD)
PIV_COMMON_SOURCES+= readpassphrase.c
endif

RAGEL_VER := $(shell $(RAGEL) -v | \
awk '$$5 == "version" { print ($$6 > 6.0); }')

ifeq ($(RAGEL_VER), 1)
%.c: %.rl
$(RAGEL) -o $@ $<
%.png: %.rl
$(RAGEL) -Vp $< | dot -Tpng > $@
endif

PIV_CERT_SOURCES= \
piv-certs.c \
Expand Down

0 comments on commit 512ec6a

Please sign in to comment.