fix make dist

This commit is contained in:
Peter Wu 2012-08-30 15:30:07 +02:00
parent 8fd383115f
commit 86fee22565
3 changed files with 34 additions and 29 deletions

View file

@ -1,31 +1,7 @@
CLOSURE=java -jar $(srcdir)/lsp/closure-compiler.jar --warning_level QUIET
EXTRA_DIST=server.html server.html.h VERSION lsp/*.js lsp/*.html lsp/*.css src/embed.js*
SUBDIRS=. src
BUILT_SOURCES=lsp/compressed.js server.html.h src/embed.js.h
CLEANFILES=$(BUILT_SOURCES)
EXTRA_DIST=VERSION lsp/jquery.js lsp/placeholder.js lsp/md5.js lsp/main.js lsp/functions.js
EXTRA_DIST+=lsp/header.html lsp/footer.html lsp/style.css src/embed.js
SUBDIRS=src
docs:
doxygen ./Doxyfile > /dev/null
.PHONY: docs
SOURCES=server.html.h
lspSOURCES=$(srcdir)/lsp/jquery.js $(srcdir)/lsp/placeholder.js $(srcdir)/lsp/md5.js $(srcdir)/lsp/main.js $(srcdir)/lsp/functions.js
lsp/compressed.js: $(lspSOURCES)
-mkdir lsp
$(CLOSURE) --js_output_file $@ $(lspSOURCES)
src/embed.js.h: $(srcdir)/src/embed.js
$(CLOSURE) --js_output_file embed.js $<
xxd -i embed.js embed.js.h
rm embed.js
mv embed.js.h src/
server.html: lsp/compressed.js
cat $(srcdir)/lsp/header.html lsp/compressed.js > $@
echo "<script>" >> $@
cat lsp/compressed.js >> $@
echo "</script><style>" >> $@
cat $(srcdir)/lsp/style.css >> $@
echo "</style>" >> $@
cat $(srcdir)/lsp/footer.html >> $@
server.html.h: server.html
xxd -i server.html server.html.h

View file

@ -1,10 +1,16 @@
lspdir=$(srcdir)/../lsp
CLOSUREJAR=$(lspdir)/closure-compiler.jar
CLOSURE=java -jar $(CLOSUREJAR) --warning_level QUIET
BUILT_SOURCES=server.html.h embed.js.h
CLEANFILES=$(BUILT_SOURCES) server.html compressed.js
AM_CPPFLAGS = $(MIST_CFLAGS)
LDADD = $(MIST_LIBS)
SUBDIRS=converters analysers
bin_PROGRAMS=MistBuffer MistController MistConnRAW MistConnRTMP MistConnHTTP MistConnHTTPProgressive MistConnHTTPDynamic
MistBuffer_SOURCES=buffer.cpp buffer_user.h buffer_user.cpp buffer_stream.h buffer_stream.cpp tinythread.cpp tinythread.h ../VERSION
MistBuffer_LDADD=$(MIST_LIBS) -lpthread
MistController_SOURCES=controller.cpp ../VERSION ../server.html.h
MistController_SOURCES=controller.cpp ../VERSION ./server.html.h
MistConnRAW_SOURCES=conn_raw.cpp ../VERSION
MistConnRTMP_SOURCES=conn_rtmp.cpp ../VERSION
MistConnHTTP_SOURCES=conn_http.cpp tinythread.cpp tinythread.h ../VERSION ./embed.js.h
@ -12,3 +18,26 @@ MistConnHTTP_LDADD=$(MIST_LIBS) -lpthread
MistConnHTTPProgressive_SOURCES=conn_http_progressive.cpp ../VERSION
MistConnHTTPDynamic_SOURCES=conn_http_dynamic.cpp ../VERSION
lspSOURCES=$(lspdir)/jquery.js $(lspdir)/placeholder.js $(lspdir)/md5.js $(lspdir)/main.js $(lspdir)/functions.js
lspDATA=$(lspdir)/header.html $(lspdir)/style.css $(lspdir)/footer.html
embed.js.h: $(srcdir)/embed.js $(CLOSUREJAR)
$(CLOSURE) $< > embed.min.js
xxd -i embed.min.js | sed s/_min_/_/g > embed.js.h
rm embed.min.js
compressed.js: $(lspSOURCES) $(CLOSUREJAR)
-mkdir lsp
$(CLOSURE) $(lspSOURCES) > $@
server.html: compressed.js $(lspDATA)
cat $(lspdir)/header.html > $@
echo "<script>" >> $@
cat compressed.js >> $@
echo "</script><style>" >> $@
cat $(lspdir)/style.css >> $@
echo "</style>" >> $@
cat $(lspdir)/footer.html >> $@
server.html.h: server.html
xxd -i server.html server.html.h

View file

@ -30,7 +30,7 @@
#include <mist/http_parser.h>
#include <mist/procs.h>
#include <mist/auth.h>
#include "../server.html.h"
#include "server.html.h"
#define UPLINK_INTERVAL 30
#define COMPILED_USERNAME ""