ol3 is now internal, ol is now external
As discussed with @ahocevar, @elemoine and @tschaub.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
PLOVR_JAR=bin/plovr-4b3caf2b7d84.jar
|
||||
SRC = $(shell find externs src/ol -name \*.js)
|
||||
API = $(shell find src/api -name \*.js)
|
||||
SRC_OL = $(shell find src/ol -name \*.js)
|
||||
SRC_OL3 = $(shell find externs src/ol3 -name \*.js)
|
||||
TARGETS = $(shell find demos -name advanced-optimizations.js -o -name simple-optimizations.js)
|
||||
comma := ,
|
||||
empty :=
|
||||
@@ -10,49 +10,49 @@ space := $(empty) $(empty)
|
||||
all: build demos webgl-debug.js
|
||||
|
||||
.PHONY: build
|
||||
build: build/ol3-api.js build/ol3-compiled.js
|
||||
build: build/ol.js build/ol3-compiled.js
|
||||
|
||||
build/ol3-api.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
build/ol3-api.json src/api/api.js
|
||||
java -jar $(PLOVR_JAR) build build/ol3-api.json >$@
|
||||
build/ol.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
build/ol.json src/ol/ol.js
|
||||
java -jar $(PLOVR_JAR) build build/ol.json >$@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@echo $@ " compressed:" $$(gzip -9 -c <$@ | wc -c) bytes
|
||||
|
||||
build/ol3-compiled.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
build/ol3-compiled.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
build/ol3.json build/ol3.js
|
||||
java -jar $(PLOVR_JAR) build build/ol3.json >$@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@echo $@ " compressed:" $$(gzip -9 -c <$@ | wc -c) bytes
|
||||
|
||||
build/ol3.js: $(SRC)
|
||||
( echo "goog.require('goog.dom');" ; find src/ol -name \*.js | xargs grep -rh ^goog.provide | sort | uniq | sed -e 's/provide/require/g' ) > $@
|
||||
build/ol3.js: $(SRC_OL3)
|
||||
( echo "goog.require('goog.dom');" ; find src/ol3 -name \*.js | xargs grep -rh ^goog.provide | sort | uniq | sed -e 's/provide/require/g' ) > $@
|
||||
|
||||
.PHONY: demos
|
||||
demos: demos/api1 demos/proj4js demos/side-by-side demos/two-layers
|
||||
|
||||
.PHONY: demos/api1
|
||||
demos/api1: \
|
||||
build/ol3-api.js \
|
||||
build/ol.js \
|
||||
demos/api1/build.html \
|
||||
demos/api1/debug.html
|
||||
|
||||
demos/api1/build.html: demos/api1/index.html.in
|
||||
sed -e 's|@SRC@|../../build/ol3-api.js|' $< > $@
|
||||
sed -e 's|@SRC@|../../build/ol.js|' $< > $@
|
||||
|
||||
demos/api1/debug.html: demos/api1/index.html.in
|
||||
sed -e 's|@SRC@|http://localhost:9810/compile?id=ol3-api|' $< > $@
|
||||
sed -e 's|@SRC@|http://localhost:9810/compile?id=ol|' $< > $@
|
||||
|
||||
.PHONY: demos/proj4js
|
||||
demos/proj4js: \
|
||||
build/ol3-api.js \
|
||||
build/ol.js \
|
||||
demos/proj4js/build.html \
|
||||
demos/proj4js/debug.html
|
||||
|
||||
demos/proj4js/build.html: demos/proj4js/index.html.in
|
||||
sed -e 's|@SRC@|../../build/ol3-api.js|' $< > $@
|
||||
sed -e 's|@SRC@|../../build/ol.js|' $< > $@
|
||||
|
||||
demos/proj4js/debug.html: demos/proj4js/index.html.in
|
||||
sed -e 's|@SRC@|http://localhost:9810/compile?id=ol3-api|' $< > $@
|
||||
sed -e 's|@SRC@|http://localhost:9810/compile?id=ol|' $< > $@
|
||||
|
||||
.PHONY: demos/side-by-side
|
||||
demos/side-by-side: \
|
||||
@@ -65,7 +65,7 @@ demos/side-by-side: \
|
||||
demos/side-by-side/advanced-optimizations.html: demos/side-by-side/index.html.in
|
||||
sed -e 's|@SRC@|advanced-optimizations.js|' $< > $@
|
||||
|
||||
demos/side-by-side/advanced-optimizations.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
demos/side-by-side/advanced-optimizations.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
demos/side-by-side/side-by-side.json demos/side-by-side/side-by-side.js
|
||||
java -jar $(PLOVR_JAR) build demos/side-by-side/side-by-side.json >$@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@@ -78,7 +78,7 @@ demos/side-by-side/simple-optimizations.html: demos/side-by-side/index.html.in
|
||||
sed -e 's|@SRC@|simple-optimizations.js|' $< > $@
|
||||
|
||||
# FIXME invoke plovr directly, rather than assuming that the server is running
|
||||
demos/side-by-side/simple-optimizations.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
demos/side-by-side/simple-optimizations.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
demos/side-by-side/side-by-side.json demos/side-by-side/side-by-side.js
|
||||
curl 'http://localhost:9810/compile?id=demo-side-by-side&mode=SIMPLE' > $@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@@ -95,7 +95,7 @@ demos/two-layers: \
|
||||
demos/two-layers/advanced-optimizations.html: demos/two-layers/index.html.in
|
||||
sed -e 's|@SRC@|advanced-optimizations.js|' $< > $@
|
||||
|
||||
demos/two-layers/advanced-optimizations.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
demos/two-layers/advanced-optimizations.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
demos/two-layers/two-layers.json demos/two-layers/two-layers.js
|
||||
java -jar $(PLOVR_JAR) build demos/two-layers/two-layers.json >$@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@@ -108,7 +108,7 @@ demos/two-layers/simple-optimizations.html: demos/two-layers/index.html.in
|
||||
sed -e 's|@SRC@|simple-optimizations.js|' $< > $@
|
||||
|
||||
# FIXME invoke plovr directly, rather than assuming that the server is running
|
||||
demos/two-layers/simple-optimizations.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
demos/two-layers/simple-optimizations.js: $(PLOVR_JAR) $(SRC_OL3) base.json \
|
||||
demos/two-layers/two-layers.json demos/two-layers/two-layers.js
|
||||
curl 'http://localhost:9810/compile?id=demo-two-layers&mode=SIMPLE' > $@
|
||||
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
|
||||
@@ -116,11 +116,11 @@ demos/two-layers/simple-optimizations.js: $(PLOVR_JAR) $(SRC) base.json \
|
||||
|
||||
.PHONY: serve
|
||||
serve: $(PLOVR_JAR)
|
||||
java -jar $(PLOVR_JAR) serve build/ol3.json build/ol3-api.json demos/*/*.json
|
||||
java -jar $(PLOVR_JAR) serve build/ol.json build/ol3.json demos/*/*.json
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(API) $(filter-out $(TARGETS),$(shell find demos -name \*.js))
|
||||
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC_OL3) $(SRC_OL) $(filter-out $(TARGETS),$(shell find demos -name \*.js))
|
||||
|
||||
webgl-debug.js:
|
||||
curl https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/debug/webgl-debug.js > $@
|
||||
@@ -130,7 +130,9 @@ $(PLOVR_JAR):
|
||||
|
||||
clean:
|
||||
rm -f build/all.js
|
||||
rm -f build/ol.js
|
||||
rm -f build/ol3.js
|
||||
rm -f build/ol3-compiled.js
|
||||
rm -f demos/*/*.html
|
||||
rm -f demos/*/advanced-optimizations.*
|
||||
rm -f demos/*/simple-optimizations.*
|
||||
|
||||
Reference in New Issue
Block a user