Skip to content

Commit

Permalink
Added leex file generation to compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenpratt committed Oct 27, 2009
1 parent 643ea4f commit e0e7b81
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1,204 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
ebin
.project
.settings
src/log4erl_lex.erl
src/log4erl_parser.erl
8 changes: 7 additions & 1 deletion src/Makefile
Expand Up @@ -23,15 +23,21 @@ BEAMS=$(ERLS:.erl=.beam)
BEAMS = $(ERLS:.erl=.beam)
MODS = $(BEAMS:.beam=)

all: generate_parser compile
all: generate_parser generate_lex compile

%.beam: %.erl
@echo ">>" compiling: $<
@$(ERLC) $<

generate_parser:
@echo ">>" generating log4erl_parser.erl from log4erl_parser.yrl $<
erlc log4erl_parser.yrl

# export LEEX_PATH env var for this to work
generate_lex:
@echo ">>" generating log4erl_lex.erl from log4erl_lex.xrl $<
erl -pa $$LEEX_PATH/ebin -s leex file log4erl_lex.xrl -s init stop

compile: ${MODS:%=%.beam}

clean:
Expand Down

0 comments on commit e0e7b81

Please sign in to comment.