| 1 |
#---*- Makefile -*------------------------------------------------------- |
| 2 |
|
| 3 |
# Configure where the grammar source files reside: |
| 4 |
|
| 5 |
RST_FILE_DIR = . |
| 6 |
|
| 7 |
RST_FILES = $(wildcard ${RST_FILE_DIR}/*.rst) |
| 8 |
|
| 9 |
GRAMMAR_START_STRING = \(\* BEGIN EBNF GRAMMAR |
| 10 |
GRAMMAR_END_STRING = \(\* END EBNF GRAMMAR |
| 11 |
|
| 12 |
GRAMMARS = $(shell awk '/^ *${GRAMMAR_START_STRING}/{print $$5}' ${RST_FILES}) |
| 13 |
GRAMMAR_DIR = tests/generated |
| 14 |
EBNF_FILES = ${GRAMMARS:%=${GRAMMAR_DIR}/%.ebnf} |
| 15 |
GRAMMAR_FILES = ${EBNF_FILES:%.ebnf=%.g} |