Browse files

add a target png for picture generation

  • Loading branch information...
1 parent 582d5e7 commit f31fa515b1e1f296685b761c088e98a1fd68cee8 @fperrad fperrad committed Oct 25, 2010
Showing with 43 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 Makefile
  3. +12 −1 apps/Makefile
  4. +16 −1 services/Makefile
  5. +10 −1 services/github/Makefile
View
1 .gitignore
@@ -1,3 +1,4 @@
*.yaml
*.rx
+*.dot
View
4 Makefile
@@ -5,6 +5,10 @@ check:
test: check
+png:
+ @make -C apps png
+ @make -C services png
+
clean:
@make -C apps clean
@make -C services clean
View
13 apps/Makefile
@@ -1,5 +1,6 @@
VALIDATOR := perl ../utils/validator.pl --schema spore_validation.rx --description
+SPORE2DOT := perl ../utils/spore2dot.pl
check: spore_validation.rx
@$(VALIDATOR) couchdb.json
@@ -10,5 +11,15 @@ test: check
spore_validation.rx:
wget http://github.com/SPORE/specifications/raw/master/spore_validation.rx
+png: \
+ couchdb.png \
+ presque.png
+
+%.png : %.dot
+ dot -T png -o $@ $<
+
+%.dot: %.json
+ $(SPORE2DOT) $< > $@
+
clean:
- -rm spore_validation.rx
+ -rm *.png *.dot spore_validation.rx
View
17 services/Makefile
@@ -1,4 +1,5 @@
VALIDATOR := perl ../utils/validator.pl --schema spore_validation.rx --description
+SPORE2DOT := perl ../utils/spore2dot.pl
check: spore_validation.rx
@make -C github check
@@ -13,6 +14,20 @@ test: check
spore_validation.rx:
wget http://github.com/SPORE/specifications/raw/master/spore_validation.rx
+png: \
+ backtweet.png \
+ backtype.png \
+ github.png \
+ ihackernews.png \
+ twitter.png
+ @make -C github png
+
+%.png : %.dot
+ dot -T png -o $@ $<
+
+%.dot: %.json
+ $(SPORE2DOT) $< > $@
+
clean:
@make -C github clean
- -rm spore_validation.rx
+ -rm *.png *.dot spore_validation.rx
View
11 services/github/Makefile
@@ -1,5 +1,6 @@
VALIDATOR := perl ../../utils/validator.pl --schema spore_validation.rx --description
+SPORE2DOT := perl ../../utils/spore2dot.pl
check: spore_validation.rx
@$(VALIDATOR) repository.json
@@ -10,5 +11,13 @@ test: check
spore_validation.rx:
wget http://github.com/SPORE/specifications/raw/master/spore_validation.rx
+png: github.png
+
+%.png : %.dot
+ dot -T png -o $@ $<
+
+github.dot: user.json repository.json
+ $(SPORE2DOT) $^ > $@
+
clean:
- -rm spore_validation.rx
+ -rm *.png *.dot spore_validation.rx

0 comments on commit f31fa51

Please sign in to comment.