Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BIN: build and install joo_minify

  • Loading branch information...
commit 8c3d7b7a05d16963e2a9ea3248ad7291ffbc6f23 1 parent b4f308b
hhugo hhugo authored
1  .gitignore
View
@@ -24,6 +24,7 @@ toplevel/toplevel.js
examples/wiki/wikicreole.ml
examples/*/*.js
compiler/js_of_ocaml
+compiler/joo_minify
compiler/js_lexer.ml
compiler/js_lexer.mli
compiler/js_parser.ml
1  Makefile
View
@@ -47,6 +47,7 @@ uninstall:
ocamlfind remove $(LIBRARY)
ocamlfind remove $(COMPILER_LIBRARY)
rm -f $(BINDIR)/$(COMPILER)
+ rm -f $(BINDIR)/$(MINIFIER)
reinstall: uninstall install
2  Makefile.conf
View
@@ -8,7 +8,7 @@ LIBRARY := js_of_ocaml
LIBNAME := js_of_ocaml$(LIBEXT)
COMPILER := js_of_ocaml$(EXEEXT)
COMPILER_LIBRARY := js_of_ocaml_compiler
-
+MINIFIER := joo_minify$(EXEEXT)
# opt/byte
BEST := opt
2  Makefile.filelist
View
@@ -1,4 +1,4 @@
-BIN := compiler/${COMPILER}
+BIN := compiler/${COMPILER} compiler/${MINIFIER}
INTF := lib/*.cmi
17 compiler/Makefile
View
@@ -1,7 +1,7 @@
include ../Makefile.conf
-all: $(COMPILER)
+all: $(COMPILER) $(MINIFIER)
lib: compiler.cma compiler.cmxa compiler.cmxs
@@ -22,17 +22,22 @@ COMPOBJS=$(OBJS) compile.cmx
$(COMPILER): compile.$(BEST)
mv -f $< $@
-.INTERMEDIATE: compile.byte compile.opt
+$(MINIFIER): minify.$(BEST)
+ mv -f $< $@
+
+.INTERMEDIATE: compile.byte compile.opt minify.byte minify.opt
+
compile.byte: $(COMPOBJS:cmx=cmo)
ocamlfind ocamlc -package $(PACKAGES) -linkpkg -o $@ $^
+compile.opt: $(COMPOBJS)
+ ocamlfind ocamlopt -package $(PACKAGES) -linkpkg -o $@ $^
minify.byte: $(OBJS:cmx=cmo) minify.cmo
ocamlfind ocamlc -package $(PACKAGES) -linkpkg -o $@ $^
-
-
-compile.opt: $(COMPOBJS)
+minify.opt: $(OBJS:cmx=cmx) minify.cmx
ocamlfind ocamlopt -package $(PACKAGES) -linkpkg -o $@ $^
+
compiler.cma: $(OBJS:cmx=cmo)
ocamlfind ocamlc -pack -o $@ $^
@@ -63,7 +68,7 @@ compiler.cmxs: $(OBJS)
ocamllex $<
clean:
rm -f *.cm[aiox] *.cmxa *.cmxs *.o *.a
- rm -f js_of_ocaml compile.opt compile.byte
+ rm -f js_of_ocaml compile.opt compile.byte minify.opt minify.byte
depend:
${MAKE} --no-print-directory js_lexer.ml
Please sign in to comment.
Something went wrong with that request. Please try again.