1. Paweł Wieczorek
  2. ocaml-stringpainter

Commits

Paweł Wieczorek  committed 8dfa806

demo has own build-system

  • Participants
  • Parent commits a1d7e8a
  • Branches default

Comments (0)

Files changed (6)

File .hgignore

View file
 _build
-Demo.byte
-Demo.native
+demo/_build
+demo/Demo.native

File Makefile

View file
-OCAMLBUILD= ocamlbuild
+OCAMLBUILD= ocamlbuild 
 OCAMLFIND = ocamlfind
 
 SOURCE_DIRS=\
 	${LIBS}\
 	_build/src/StringPainter.a
 
-DEMO=demo/Demo.native
+.PHONY : ${LIBS} demo
 
-.PHONY : ${LIBS}
-
-all: ${LIBS}
+all: demo
 
 install: ${LIBS}
 	${OCAMLFIND} install stringpainter META ${LIB_FILES}
 ${LIBS}:
 	${OCAMLBUILD} ${SOURCE_DIRS} ${LIBS_}
 
-${DEMO}:
-	${OCAMLBUILD} ${DEMO_DIRS} ${SOURCE_DIRS} ${DEMO}
+demo: ${LIBS}
+	cd demo; ${MAKE} all
 
 clean:
-	${OCAMLBUILD} ${DEMO_DIRS} ${SOURCE_DIRS} ${DEMO} -clean
+	${OCAMLBUILD} ${SOURCE_DIRS} ${LIBS_} -clean
+	cd demo; ${MAKE} clean
 

File _tags

View file
 <src/*.cmx>: for-pack(StringPainter)
+<demo/*.*>: package(stringpainter)

File demo/Demo.ml

View file
 
 end
 
+
+let _ = print_endline "ArithmeticExpressions"
+
+let _ = ArithmeticExpressions.test ()
+
+let _ = print_endline "Lambda"
+
 let _ = Lambda.test ()

File demo/Makefile

View file
+OCAMLBUILD= ocamlbuild 
+
+DEMO=Demo.native
+
+.PHONY : ${DEMO}
+
+all: ${DEMO}
+
+${DEMO}: ${LIBS}
+	${OCAMLBUILD} -use-ocamlfind ${DEMO_DIRS} ${DEMO}
+
+clean:
+	${OCAMLBUILD} ${DEMO_DIRS} ${SOURCE_DIRS} ${DEMO} -clean
+

File demo/_tags

View file
+<*.*>: package(stringpainter)