$(FRONTEND_BIN): $(FRONTEND_SOURCES)
echo $(foreach f,$^,"document.write('<script src="fe/$(notdir $f)"></script>');\n") > $(FRONTEND_BIN)
# Compiles the frontend code for release.
compiled: SOURCES_FLAGS=$(foreach f,$(FRONTEND_SOURCES),--js=$f)
$(FRONTEND_BIN): $(FRONTEND_SOURCES)
echo $(foreach f,$^,"document.write('<script src="fe/$(notdir $f)"></script>');\n") > $(FRONTEND_BIN)
# Compiles the frontend code for release.
compiled: SOURCES_FLAGS=$(foreach f,$(FRONTEND_SOURCES),--js=$f)
java -jar closure-compiler.jar \
$(SOURCES_FLAGS) \
--js_output_file=$(FRONTEND_BIN) \
--compilation_level=SIMPLE_OPTIMIZATIONS
java -jar closure-compiler.jar \
$(SOURCES_FLAGS) \
--js_output_file=$(FRONTEND_BIN) \
--compilation_level=SIMPLE_OPTIMIZATIONS
-version: STAMP=$(shell date +%s)
-version: BUILD=$(shell gitcrement current)
-version: stamp $(VERSION_FILE)
+version:
+ if [[ -f $(VERSION_FILE) ]]; then $(MAKE) $(VERSION_FILE); fi
+$(VERSION_FILE): STAMP=$(shell date +%s)
+$(VERSION_FILE): BUILD=$(shell gitcrement next)
+$(VERSION_FILE):
@echo "// This file is automatically generated." > $(VERSION_FILE)
@echo >> $(VERSION_FILE)
@echo "$$.namespace('$(VERSION_NAMESPACE)');" >> $(VERSION_FILE)
@echo "// This file is automatically generated." > $(VERSION_FILE)
@echo >> $(VERSION_FILE)
@echo "$$.namespace('$(VERSION_NAMESPACE)');" >> $(VERSION_FILE)
echo "$(VERSION_NAMESPACE).STAMP = $(STAMP);" >> $(VERSION_FILE)
# Copies the version template to the source and commits it.
echo "$(VERSION_NAMESPACE).STAMP = $(STAMP);" >> $(VERSION_FILE)
# Copies the version template to the source and commits it.
cp $(VERSION_FILE) $(VERSION_SOURCE)
git commit $(VERSION_SOURCE) \
--author='Armadillo Build Script <armadillo@bluestatic.org>' \
cp $(VERSION_FILE) $(VERSION_SOURCE)
git commit $(VERSION_SOURCE) \
--author='Armadillo Build Script <armadillo@bluestatic.org>' \