-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
33 lines (24 loc) · 1.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SHELL := /usr/bin/env bash
PNML_FILES=$(wildcard examples/**/*.xml)
SVG_FILES=$(wildcard examples/**/**/*.svg)
RUBY_FILES=$(wildcard lib/**/*.rb)
.SECONDARY:
default: .rspec_ok examples/cucumber-protocol/transition_sample_1.gif examples/x-ray-machine/v1-problem.gif examples/x-ray-machine/v2-fixed.gif
.rspec_ok: Gemfile.lock $(RUBY_FILES)
bundle exec rspec
touch $@
Gemfile.lock: Gemfile
bundle install
touch $@
examples/cucumber-protocol/transition_sample_1.gif: examples/cucumber-protocol/cucumber-protocol.xml Gemfile.lock $(RUBY_FILES) exe/petrinet
ruby -Ilib exe/petrinet --script examples/cucumber-protocol/transition_sample_1.txt --output $@ $<
examples/x-ray-machine/v1-problem.gif: examples/x-ray-machine/x-ray-machine-1.xml Gemfile.lock $(RUBY_FILES) exe/petrinet
ruby -Ilib exe/petrinet --script examples/x-ray-machine/v1-problem.txt --output $@ $<
examples/x-ray-machine/v2-fixed.gif: examples/x-ray-machine/x-ray-machine-2.xml Gemfile.lock $(RUBY_FILES) exe/petrinet
ruby -Ilib exe/petrinet --script examples/x-ray-machine/v2-fixed.txt --output $@ $<
clean:
rm -f examples/**/*.gif .rspec_ok
.PHONY: clean
clobber: clean
rm -f Gemfile.lock
.PHONY: clobber