From 4df3283fcf646b8ca5890b0d970c7c073ae3f689 Mon Sep 17 00:00:00 2001 From: electron128 Date: Tue, 13 Oct 2015 20:27:53 +0200 Subject: [PATCH] webui: restored Makefile --- libresapi/src/webui/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 libresapi/src/webui/Makefile diff --git a/libresapi/src/webui/Makefile b/libresapi/src/webui/Makefile new file mode 100644 index 000000000..cd96f11ce --- /dev/null +++ b/libresapi/src/webui/Makefile @@ -0,0 +1,36 @@ +REACT_VERSION = 0.13.1 + +DISTDIR = ../webfiles +JSEXTLIBS = $(DISTDIR)/react.js $(DISTDIR)/JSXTransformer.js +JSLIBS = RsXHRConnection.js RsApi.js +HTML = index.html +JSGUI = gui.jsx +CSS = green-black.css + +all: $(DISTDIR) $(JSEXTLIBS) $(addprefix $(DISTDIR)/, $(JSLIBS)) $(addprefix $(DISTDIR)/, $(HTML)) $(addprefix $(DISTDIR)/, $(JSGUI)) $(addprefix $(DISTDIR)/, $(CSS)) +.PHONY: all + +$(DISTDIR)/livereload: $(DISTDIR) $(JSEXTLIBS) $(addprefix $(DISTDIR)/, $(JSLIBS)) $(addprefix $(DISTDIR)/, $(HTML)) $(addprefix $(DISTDIR)/, $(JSGUI)) $(addprefix $(DISTDIR)/, $(CSS)) + wget -qO- http://localhost:9090/api/v2/livereload/trigger + touch $(DISTDIR)/livereload + +$(DISTDIR)/react.js: + cd $(DISTDIR) && wget --no-check-certificate --output-document react.js http://fb.me/react-$(REACT_VERSION).js + +$(DISTDIR)/JSXTransformer.js: + cd $(DISTDIR) && wget --no-check-certificate --output-document JSXTransformer.js http://fb.me/JSXTransformer-$(REACT_VERSION).js + +$(addprefix $(DISTDIR)/, $(JSLIBS)): $(DISTDIR)/%: % + cp $< $@ + +$(addprefix $(DISTDIR)/, $(HTML)): $(DISTDIR)/%: % + cp $< $@ + +$(addprefix $(DISTDIR)/, $(JSGUI)): $(DISTDIR)/%: % + cp $< $@ + +$(addprefix $(DISTDIR)/, $(CSS)): $(DISTDIR)/%: % + cp $< $@ + +$(DISTDIR): + mkdir $(DISTDIR)