Some fixes for building bmpp file.
authorRichard W.M. Jones <rich@annexia.org>
Tue, 1 Jul 2008 14:01:47 +0000 (14:01 +0000)
committerRichard W.M. Jones <rich@annexia.org>
Tue, 1 Jul 2008 14:01:47 +0000 (14:01 +0000)
cil-tools/Makefile.in
cil-tools/ext3.c
cil-tools/ext3.ml

index 7a0d9db..c596b0e 100644 (file)
@@ -61,21 +61,21 @@ EXAMPLES    = ext3
 
 examples: $(EXAMPLES)
 
-ext3: ext3.cmo ext3.bmpp
+ext3: ext3.cmo
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@
 
-ext3.cmo: ext3.ml
+ext3.cmo: ext3.ml ext3.bmpp
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@
 
 ext3.bmpp: ext3.c bitmatch-import-c
        rm -f $@.new
-       ./bitmatch-import-c $(DEBUG) $(LINUX_INCLUDES) $< > $@.new
+       ./bitmatch-import-c $(DEBUG) $< > $@.new
        mv $@.new $@
 
-task_struct: task_struct.cmo task_struct.bmpp
+task_struct: task_struct.cmo
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@
 
-task_struct.cmo: task_struct.ml
+task_struct.cmo: task_struct.ml task_struct.bmpp
        $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@
 
 task_struct.bmpp: task_struct.c bitmatch-import-c
@@ -87,7 +87,7 @@ task_struct.bmpp: task_struct.c bitmatch-import-c
 # Clean.
 
 clean:
-       rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o
+       rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o *.bmpp
        rm -f bitmatch-import-c bitmatch-import-c.opt
 
 distclean: clean
index cf4f695..1d8672f 100644 (file)
@@ -18,9 +18,9 @@
  * interested in.
  */
 #include <linux/magic.h>
-#include <linux/ext3_fs.h>
+#include <linux/ext2_fs.h>
 
 /* This tells the importer program what structures and constants to import. */
 //typedef struct ext3_super_block BITMATCH_IMPORT(ext3_super_block);
-typedef struct ext3_super_block BITMATCH_IMPORT(ext3_super_block);
+typedef struct ext2_super_block BITMATCH_IMPORT(ext3_super_block);
 BITMATCH_CONSTANT_INT32 (ext3_super_magic, EXT3_SUPER_MAGIC);
index dbbe210..15ebd24 100644 (file)
@@ -15,7 +15,7 @@ let () =
   let bits = Bitmatch.bitstring_of_file "examples/ext3_sb" in
 
   bitmatch bits with
-  | { :ext3_super_block } ->
+  | { :ext2_super_block } ->
       printf "ext3 superblock:\n";
       printf "  s_inodes_count = %ld\n" s_inodes_count;
       printf "  s_blocks_count = %ld\n" s_blocks_count;