Makefile.in
missing
*.o
+ocaml/hivex.ml
+ocaml/hivex.mli
+ocaml/hivex_c.c
+ocaml/META
+ocaml/*.so
+ocaml/t/hivex_005_load
+perl/blib
+perl/Hivex.bs
+perl/Hivex.c
+perl/Hivex.xs
+perl/lib/Win/Hivex.pm
+perl/Makefile-pl
+perl/Makefile-pl.old
+perl/Makefile.PL
+perl/pm_to_blib
pod2htm?.tmp
po/*.gmo
po/Makevars.template
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin
+python/*.pyc
+python/hivex-py.c
+python/hivex.py
sh/*.1
sh/hivexsh
stamp-h1
SUBDIRS = gnulib/lib lib images gnulib/tests sh xml po
+if HAVE_OCAML
+SUBDIRS += ocaml
+endif
+
+if HAVE_PERL
+SUBDIRS += perl
+endif
+
+if HAVE_PYTHON
+SUBDIRS += python
+endif
+
EXTRA_DIST = hivex.pc hivex.pc.in README LICENSE
# Generate the ChangeLog automatically from the gitlog.
# anything that is required at configure-time when configure is run
# from a distribution tarball. From those, nothing ocaml-related is
# required.
+mkdir -p perl/lib/Win
./generator/generator.ml
# If no arguments were specified and configure has run before, use the previous
images/Makefile
lib/Makefile
lib/tools/Makefile
+ ocaml/Makefile ocaml/META
+ perl/Makefile perl/Makefile.PL
po/Makefile.in
+ python/Makefile
sh/Makefile
xml/Makefile])
AC_OUTPUT
Lesser General Public License for more details.
"
+and generate_ocaml_interface () =
+ generate_header OCamlStyle LGPLv2plus;
+ pr "val open_file : unit\n"
+
+and generate_ocaml_implementation () =
+ generate_header OCamlStyle LGPLv2plus;
+ pr "let open_file = ()\n"
+
+and generate_ocaml_c () =
+ generate_header CStyle LGPLv2plus
+
+and generate_perl_pm () =
+ generate_header HashStyle LGPLv2plus
+
+and generate_perl_xs () =
+ generate_header CStyle LGPLv2plus
+
+and generate_python_py () =
+ generate_header HashStyle LGPLv2plus
+
+and generate_python_c () =
+ generate_header CStyle LGPLv2plus
+
let output_to filename k =
let filename_new = filename ^ ".new" in
chan := open_out filename_new;
output_to "lib/hivex.h" generate_c_header;
output_to "lib/hivex.pod" generate_c_pod;
+ output_to "ocaml/hivex.mli" generate_ocaml_interface;
+ output_to "ocaml/hivex.ml" generate_ocaml_implementation;
+ output_to "ocaml/hivex_c.c" generate_ocaml_c;
+
+ output_to "perl/lib/Win/Hivex.pm" generate_perl_pm;
+ output_to "perl/Hivex.xs" generate_perl_xs;
+
+ output_to "python/hivex.py" generate_python_py;
+ output_to "python/hivex-py.c" generate_python_c;
+
(* Always generate this file last, and unconditionally. It's used
* by the Makefile to know when we must re-run the generator.
*)
--- /dev/null
+hivex.cmi:
+hivex.cmo: hivex.cmi
+hivex.cmx: hivex.cmi
--- /dev/null
+name="hivex"
+version="@PACKAGE_VERSION@"
+description="Windows Registry hive file bindings for OCaml"
+requires="unix"
+archive(byte)="mlhivex.cma"
+archive(native)="mlhivex.cmxa"
--- /dev/null
+# hivex OCaml bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+EXTRA_DIST = \
+ .depend META.in \
+ hivex.mli hivex.ml \
+ hivex_c.c \
+ t/*.ml
+
+CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so
+CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
+
+AM_CPPFLAGS = \
+ -I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
+ -I$(top_srcdir)/lib \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS)
+
+if HAVE_OCAML
+
+noinst_DATA = mlhivex.cma mlhivex.cmxa META
+
+OBJS = hivex_c.o hivex.cmo
+XOBJS = $(OBJS:.cmo=.cmx)
+
+mlhivex.cma: $(OBJS)
+ $(OCAMLMKLIB) -o mlhivex $^ -L$(top_builddir)/lib/.libs -lhivex
+
+mlhivex.cmxa: $(XOBJS)
+ $(OCAMLMKLIB) -o mlhivex $^ -L$(top_builddir)/lib/.libs -lhivex
+
+hivex_c.o: hivex_c.c
+ $(CC) $(AM_CPPFLAGS) $(CFLAGS) -fPIC -Wall -c $<
+
+TESTS_ENVIRONMENT = \
+ LD_LIBRARY_PATH=$(top_builddir)/lib/.libs \
+ $(VG)
+
+TESTS = t/hivex_005_load
+noinst_DATA += $(TESTS)
+
+t/hivex_005_load: t/hivex_005_load.cmx mlhivex.cmxa
+ mkdir -p t
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/lib/.libs -I . -package unix -linkpkg mlhivex.cmxa $< -o $@
+
+# Need to rebuild the tests from source if the main library has
+# changed at all, otherwise we get inconsistent assumptions.
+t/%.cmx: t/%.ml mlhivex.cmxa
+ $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $@
+
+.mli.cmi:
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $@
+.ml.cmo:
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $@
+.ml.cmx:
+ $(OCAMLFIND) ocamlopt -package unix -c $< -o $@
+
+depend: .depend
+
+.depend: $(wildcard *.mli) $(wildcard *.ml)
+ rm -f $@ $@-t
+ $(OCAMLFIND) ocamldep $^ | sed 's/ *$$//' | sort > $@-t
+ mv $@-t $@
+
+include .depend
+
+SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly
+
+# Do the installation by hand, because we want to run ocamlfind.
+install-data-hook:
+ mkdir -p $(DESTDIR)$(OCAMLLIB)
+ mkdir -p $(DESTDIR)$(OCAMLLIB)/stublibs
+ $(OCAMLFIND) install \
+ -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
+ hivex \
+ META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli
+
+CLEANFILES += $(noinst_DATA)
+
+endif
+
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel. (See RHBZ#502309).
+.NOTPARALLEL:
--- /dev/null
+(* hivex OCaml bindings
+ * Copyright (C) 2009-2010 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *)
+
+(* Just links with the library, doesn't run anything. *)
+let _ = Hivex.open_file
--- /dev/null
+# hivex Perl bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile (
+ FIRST_MAKEFILE => 'Makefile-pl',
+
+ NAME => 'Win::Hivex',
+ VERSION => '@PACKAGE_VERSION@',
+
+ LIBS => '-L@top_builddir@/lib/.libs -lhivex',
+ INC => '-I@top_builddir@/lib -I@top_srcdir@/lib',
+ TYPEMAPS => [ '@srcdir@/typemap' ],
+ CCFLAGS => '@CFLAGS@',
+ );
--- /dev/null
+# hivex Perl bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+EXTRA_DIST = \
+ Makefile.PL.in \
+ run-perl-tests \
+ lib/Win/Hivex.pm \
+ Hivex.xs \
+ t/*.t \
+ typemap
+
+if HAVE_PERL
+
+# Interfacing automake and ExtUtils::MakeMaker known to be
+# a nightmare, news at 11.
+
+# hivex source dependencies
+.PHONY: src_deps
+src_deps: $(top_builddir)/lib/libhivex.la
+
+TESTS = run-perl-tests
+
+$(TESTS): src_deps all
+
+TESTS_ENVIRONMENT = \
+ LD_LIBRARY_PATH=$(top_builddir)/lib/.libs
+
+INSTALLDIRS = site
+
+all: Makefile-pl src_deps
+ $(MAKE) -f Makefile-pl
+
+Makefile-pl: Makefile.PL
+ perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
+
+# No! Otherwise it is deleted before the clean-local rule runs.
+#CLEANFILES = Makefile-pl
+
+clean-local:
+ -$(MAKE) -f Makefile-pl clean
+ rm -f Makefile-pl
+
+install-data-hook:
+ $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install
+
+endif
--- /dev/null
+#!/bin/sh -
+# hivex Perl bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+set -e
+
+make -f Makefile-pl test "$@"
--- /dev/null
+TYPEMAP
+char * T_PV
+const char * T_PV
+guestfs_h * O_OBJECT_guestfs_h
+int64_t T_IV
+
+INPUT
+O_OBJECT_guestfs_h
+ if (sv_isobject ($arg) && SvTYPE (SvRV ($arg)) == SVt_PVMG)
+ $var = ($type) SvIV ((SV *) SvRV ($arg));
+ else {
+ warn (\"${Package}::$func_name(): $var is not a blessed SV reference\");
+ XSRETURN_UNDEF;
+ }
+
+OUTPUT
+O_OBJECT_guestfs_h
+ sv_setref_pv ($arg, "Sys::Guestfs", (void *) $var);
images/mklarge.c
lib/hivex.c
+ocaml/hivex_c.c
+perl/Hivex.c
+perl/blib/lib/Win/Hivex.pm
+perl/lib/Win/Hivex.pm
+python/hivex-py.c
sh/hivexsh.c
xml/hivexml.c
--- /dev/null
+# hivex Python bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= $(top_builddir)/python
+
+EXTRA_DIST = \
+ run-python-tests \
+ hivex.py \
+ hivex-py.c \
+ t/*.py
+
+if HAVE_PYTHON
+
+pythondir = $(PYTHON_SITE_PACKAGES)
+
+python_DATA = hivex.py
+
+python_LTLIBRARIES = libhivexmod.la
+
+libhivexmod_la_SOURCES = hivex-py.c
+libhivexmod_la_CFLAGS = -Wall -I$(PYTHON_INCLUDEDIR) \
+ -I$(top_srcdir)/lib -I$(top_builddir)/lib
+libhivexmod_la_LIBADD = $(top_builddir)/lib/libhivex.la
+
+TESTS_ENVIRONMENT = \
+ PYTHONPATH=$(builddir):$(builddir)/.libs
+
+TESTS = run-python-tests
+
+endif
--- /dev/null
+#!/bin/sh -
+# hivex Python bindings
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+set -e
+shopt -s nullglob
+
+for f in t/*.py; do
+ python $f
+done