Browse files

fixed Makefile.

  • Loading branch information...
1 parent a646d64 commit 13e39c89f048869b4344b3f29e83dd4ee9a70083 @agentzh committed Dec 30, 2011
Showing with 10 additions and 10 deletions.
  1. +1 −0 .gitignore
  2. +9 −10 Makefile
View
1 .gitignore
@@ -9,3 +9,4 @@ knowledge/goal-match.clp
knowledge/vector-eval.clp
knowledge/vectorize.clp
lib/VRG/Compiler.pm
+doc/*.html
View
19 Makefile
@@ -1,17 +1,10 @@
-PERL_BIN := E:/perl/bin
-PERL_LIB := E:/perl/site/lib
-
sample_vrg_files := $(wildcard sample/*.vrg)
sample_png_files := $(patsubst %.vrg,%.png,$(sample_vrg_files))
xpro := perl xprolog/xpro.pl
xclp := xclips -I knowledge -c
vrg_run := perl -Ilib script/vrg-run.pl
-rm_f = perl -MExtUtils::Command -e rm_f
-mv_f = perl -MExtUtils::Command -e mv
-cp_f = perl -MExtUtils::Command -e cp
-
xpro_files := $(wildcard xprolog/*.xpro)
pro_files := $(patsubst %.xpro,%.pro, $(xpro_files))
@@ -22,15 +15,18 @@ vpath %.xclp knowledge
vpath %.grammar grammar
vpath %.pl script xprolog
+.PHONY: all clips_all prolog_all clean veryclean doc
+
all: clips_all
clips_all: lib/VRG/Compiler.pm $(clp_files)
prolog_all: $(pro_files)
lib/VRG/Compiler.pm: vrgs.grammar
+ mkdir -p lib/VRG
perl -s -MParse::RecDescent - -RD_HINT $< VRG::Compiler
- $(mv_f) Compiler.pm $@
+ mv Compiler.pm $@
%.pro: %.xpro xprolog/xpro.pl
$(xpro) $<
@@ -46,16 +42,19 @@ testprolog: prolog_all
testall: prolog_all clips_all
prove -I../xclips/lib -Ilib t/*.t xprolog/*.t
+doc:
+ cd doc && $(MAKE)
+
test: clips_all
prove -I../xclips/lib -Ilib t/*.t
clean:
- $(rm_f) xprolog/*.pro xprolog/0*.xpro 0*.xclp *.clp *.vrg \
+ rm -f xprolog/*.pro xprolog/0*.xpro 0*.xclp *.clp *.vrg \
sample/*.clp sample/*.xclp *.png
clips-cover -d
veryclean: clean
- $(rm_f) lib/VRG/Compiler.pm \
+ lib/VRG/Compiler.pm \
knowledge/*.clp
sample: $(sample_png_files)

0 comments on commit 13e39c8

Please sign in to comment.