Permalink
Browse files

new Makefile

  • Loading branch information...
1 parent e62ba3c commit 74459e366deeedff5a0b90f9cf4dd45dab514b8c @ingydotnet committed Nov 8, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 Makefile
View
@@ -1,12 +1,12 @@
-GRAMMAR = *.pgx
-export PERL5LIB=../pegex-pm/lib:../pegex-cmd-pm/lib
-STYLE ?= NORMAL
-NORMAL_COMMAND = pegex compile --to=
-BOOT_COMMAND = pegex compile --boot --to=
-COMMAND = ${${STYLE}_COMMAND}
-ALL = $(GRAMMAR).yaml $(GRAMMAR).json
+GRAMMAR = $(shell echo *.pgx)
+export PERL5LIB=../pegex-pm/lib
+COMPILE_COMMAND = pegex compile $(OPTIONS) --to=
+ALL = $(GRAMMAR:%=%.yaml) $(GRAMMAR:%=%.json)
all: $(ALL)
$(ALL): $(GRAMMAR) Makefile
- $(COMMAND)$(@:$<.%=%) $< > $@
+ $(COMPILE_COMMAND)$(shell perl -e '$$_="$@";s/.*\.//;print') $(shell perl -e '$$_="$@";s/\.\w+$$//;print') > $@
+
+clean purge:
+ rm -f *.yaml *.json

0 comments on commit 74459e3

Please sign in to comment.