OSDN Git Service

merge src/ and test/ at xml/
authormzp <mzpppp@gmail.com>
Fri, 4 Sep 2009 08:38:29 +0000 (17:38 +0900)
committermzp <mzpppp@gmail.com>
Fri, 4 Sep 2009 08:38:29 +0000 (17:38 +0900)
14 files changed:
xml/OMakefile
xml/abc.ml [moved from xml/src/abc.ml with 100% similarity]
xml/abcTest.ml [moved from xml/test/abcTest.ml with 97% similarity]
xml/byte.ml [moved from xml/src/byte.ml with 100% similarity]
xml/byteTest.ml [moved from xml/test/byteTest.ml with 100% similarity]
xml/code.ml [moved from xml/src/code.ml with 100% similarity]
xml/codeTest.ml [moved from xml/test/codeTest.ml with 100% similarity]
xml/disasm.ml [moved from xml/src/disasm.ml with 100% similarity]
xml/easyXml.ml [moved from xml/src/easyXml.ml with 100% similarity]
xml/main.ml [moved from xml/src/main.ml with 100% similarity]
xml/parsec.ml [moved from xml/src/parsec.ml with 100% similarity]
xml/swfmill.ml [moved from xml/src/swfmill.ml with 100% similarity]
xml/swfmillTest.ml [moved from xml/test/swfmillTest.ml with 97% similarity]
xml/testSupport.ml [moved from xml/test/testSupport.ml with 100% similarity]

index 7687810..4b03df8 100644 (file)
@@ -1,11 +1,45 @@
-.PHONY: check clean
+# ------------------------------
+# BUILD
+# ------------------------------
+# package
+OCAMLPACKS[] =
+       extlib
+       xml-light
+       oUnit
+UseCamlp4(pa_oo)
 
-OCAMLINCLUDES += $(ROOT)/base/src
-OCAML_LIBS    += $(ROOT)/base/src/base
+FILES[] =
+       abc
+       byte
+       code
+       disasm
+       easyXml
+       swfmill
+       parsec
+       code
 
-.SUBDIRS: test src
+OCAMLINCLUDES += $(ROOT)/base
+OCAML_LIBS    += $(ROOT)/base/base
 
-.DEFAULT: src/habc-xml$(EXE)
+PROGRAM = habc-xml
+
+OCamlProgram($(PROGRAM), main $(FILES))
+
+
+# ------------------------------
+# Test
+# ------------------------------
+OUnitTest(byte   ,byte parsec)
+OUnitTest(abc    ,abc parsec disasm byte)
+OUnitTest(swfmill,swfmill easyXml abc code byte disasm parsec)
+OUnitTest(code   ,code easyXml)
+
+
+# ------------------------------
+# PHONY target
+# ------------------------------
+.PHONY: clean
 
 clean:
-       ocaml-clean habc-xml$(EXE)
+       ocaml-clean
+
similarity index 100%
rename from xml/src/abc.ml
rename to xml/abc.ml
similarity index 97%
rename from xml/test/abcTest.ml
rename to xml/abcTest.ml
index 50c48d9..e47b05b 100644 (file)
@@ -6,7 +6,7 @@ let ok x y =
 
 let example name =
   let ch =
-    open_in_bin @@ Printf.sprintf "../example/%s.abc" name in
+    open_in_bin @@ Printf.sprintf "example/%s.abc" name in
     Abc.of_stream @@ Byte.of_channel ch
 
 let abc =
similarity index 100%
rename from xml/src/byte.ml
rename to xml/byte.ml
similarity index 100%
rename from xml/test/byteTest.ml
rename to xml/byteTest.ml
similarity index 100%
rename from xml/src/code.ml
rename to xml/code.ml
similarity index 100%
rename from xml/test/codeTest.ml
rename to xml/codeTest.ml
similarity index 100%
rename from xml/src/disasm.ml
rename to xml/disasm.ml
similarity index 100%
rename from xml/src/easyXml.ml
rename to xml/easyXml.ml
similarity index 100%
rename from xml/src/main.ml
rename to xml/main.ml
similarity index 100%
rename from xml/src/parsec.ml
rename to xml/parsec.ml
similarity index 100%
rename from xml/src/swfmill.ml
rename to xml/swfmill.ml
similarity index 97%
rename from xml/test/swfmillTest.ml
rename to xml/swfmillTest.ml
index c8cd1a1..28166ac 100644 (file)
@@ -5,7 +5,7 @@ open EasyXml
 
 let example name =
   let ch =
-    open_in_bin @@ Printf.sprintf "../example/%s.abc" name in
+    open_in_bin @@ Printf.sprintf "example/%s.abc" name in
     Abc.of_stream @@ Byte.of_channel ch
 
 let ok x y =
similarity index 100%
rename from xml/test/testSupport.ml
rename to xml/testSupport.ml