1
0
Fork 0
icfp11/ragel.py

20 linhas
424 B
Python

#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006 (ita)
"Ragel: '.rl' files are converted into .c files using 'ragel': {.rl -> .c -> .o}"
import TaskGen
TaskGen.declare_chain(
name = 'ragel',
action = '${RAGEL} -o ${TGT} ${SRC}',
ext_in = '.rl',
ext_out = '.c',
before = 'c',
)
def detect(conf):
dang = conf.find_program('ragel', var='RAGEL')
if not dang: conf.fatal('cannot find the program "ragel"')