-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
34 lines (25 loc) · 1.09 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
34
SHELL := /bin/bash
CSD_VERSION := 0.1$(if $(BUILD_NUMBER),.$(BUILD_NUMBER),-SNAPSHOT)
GROOVY := $(if $(GROOVY_HOME),$(GROOVY_HOME)/bin/groovy,groovy)
JAVA := $(if $(JAVA_HOME),$(JAVA_HOME)/bin/java,java)
JAR := $(if $(JAVA_HOME),$(JAVA_HOME)/bin/jar,jar)
MVN := mvn
VALIDATOR := cm_ext/validator/target/validator.jar
WGET := wget -c --no-use-server-timestamps
STORM-$(CSD_VERSION).jar: descriptor/service.sdl scripts/start scripts/config images/storm.png aux/storm_env.ini
$(JAR) cf $@ $^
descriptor/service.sdl: descriptor/service.sdl.in extract_config.groovy stamp-storm $(VALIDATOR)
$(GROOVY) $(filter %.groovy,$^) < storm/storm-core/src/jvm/backtype/storm/Config.java > $@
if ! $(JAVA) -jar $(VALIDATOR) -s $@; then mv $@ [email protected]; exit 1; fi
stamp-storm:
git clone -b v0.9.3 https://github.com/apache/storm
touch $@
$(VALIDATOR): stamp-cm_ext
cd cm_ext && $(MVN) -pl validator package
stamp-cm_ext:
git clone https://github.com/cloudera/cm_ext.git
touch $@
.PHONY: clean
clean:
rm -rf stamp-* *.jar *.tmp aux/storm.yaml aux/storm.yaml.tmp cm_ext storm
.DEFAULT_GOAL := STORM-$(CSD_VERSION).jar