icfp11/ragel.py

20 lines
424 B
Python
Raw Normal View History

2008-07-11 20:38:17 +00:00
#! /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"')