Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
new Makefile.
  • Loading branch information
ingydotnet committed Nov 8, 2012
1 parent 932feee commit 2029afd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
@@ -1,9 +1,12 @@
GRAMMAR = *.pgx
GRAMMAR = $(shell echo *.pgx)
export PERL5LIB=../pegex-pm/lib
COMPILE_COMMAND = pegex compile --to=
ALL = $(GRAMMAR).yaml $(GRAMMAR).json
COMPILE_COMMAND = pegex compile $(OPTIONS) --to=
ALL = $(GRAMMAR:%=%.yaml) $(GRAMMAR:%=%.json)

all: $(ALL)

$(ALL): $(GRAMMAR) Makefile
$(COMPILE_COMMAND)$(@:$<.%=%) $< > $@
$(COMPILE_COMMAND)$(shell perl -e '$$_="$@";s/.*\.//;print') $(shell perl -e '$$_="$@";s/\.\w+$$//;print') > $@

clean purge:
rm -f *.yaml *.json

0 comments on commit 2029afd

Please sign in to comment.