+++ /dev/null
-virt_mem_mmap.cmi: virt_mem_utils.cmo
-virt_mem.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi
-virt_mem.cmx: virt_mem_utils.cmx virt_mem_mmap.cmx
-virt_mem_mmap.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi
-virt_mem_mmap.cmx: virt_mem_utils.cmx virt_mem_mmap.cmi
syntax:glob
Makefile
+Make.rules
*~
*.opt
*.annot
*.cmo
*.cmx
*.o
+*.a
+*.cma
+*.cmxa
autom4te.cache
config.h
config.h.in
config.status
configure
gmon.out
-virt-mem
-virt_mem_gettext.ml
+lib/virt_mem_gettext.ml
--- /dev/null
+# virt-mem -*- Makefile -*-
+# @configure_input@
+# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# This file is included by Makefiles in subdirectories.
+
+OCAMLFIND = @OCAMLFIND@
+OCAMLDEP = @OCAMLDEP@
+OCAMLC = @OCAMLC@
+OCAMLOPT = @OCAMLOPT@
+
+OCAMLDOC = @OCAMLDOC@
+OCAMLDOCFLAGS += -html -sort
+
+# Common rules for building OCaml objects.
+
+.mli.cmi:
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
+.ml.cmo:
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
+.ml.cmx:
+ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
+
+%.ml %.mli: %.mly
+ ocamlyacc $<
+.mll.ml:
+ ocamllex $<
+
+# Dependencies.
+
+depend: .depend
+
+.depend: $(wildcard *.mli) $(wildcard *.ml)
+ rm -f .depend
+ $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $(OCAMLDEPFLAGS) $^ > $@
+
+ifeq ($(wildcard .depend),.depend)
+include .depend
+endif
+
+# Developer documentation (in html/ subdirectory).
+
+ifneq ($(OCAMLDOC),)
+ifneq ($(OCAMLDOCFILES),)
+doc:
+ rm -rf html
+ mkdir html
+ -$(OCAMLDOC) $(OCAMLDOCFLAGS) -d html $(OCAMLDOCFILES)
+endif
+endif
+
+.PHONY: depend dist check-manifest dpkg doc
+
+.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly
--- /dev/null
+# virt-mem
+# @configure_input@
+# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+INSTALL = @INSTALL@
+
+SUBDIRS = lib uname dmesg
+
+all install:
+ for d in $(SUBDIRS) po; do \
+ $(MAKE) -C $$d $@; \
+ if [ $$? -ne 0 ]; then exit 1; fi; \
+ done
+
+depend doc:
+ for d in $(SUBDIRS); do \
+ $(MAKE) -C $$d $@; \
+ if [ $$? -ne 0 ]; then exit 1; fi; \
+ done
+
+clean:
+ for d in . $(SUBDIRS); do \
+ (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
+ *.so *.opt *~ *.dll *.exe *.annot core); \
+ done
+ for d in po; do \
+ (cd $$d; rm -f *~); \
+ done
+ rm -f uname/virt-uname
+ rm -f dmesg/virt-dmesg
+
+distclean: clean
+ rm -f config.h config.log config.status configure
+ rm -rf autom4te.cache
+ rm -f Makefile
+ rm -f virt-df/Makefile
+
+# Distribution.
+
+dist:
+ $(MAKE) check-manifest
+ rm -rf $(PACKAGE)-$(VERSION)
+ mkdir $(PACKAGE)-$(VERSION)
+ tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
+ $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
+ tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
+ rm -rf $(PACKAGE)-$(VERSION)
+ ls -l $(PACKAGE)-$(VERSION).tar.gz
+
+check-manifest:
+ hg manifest | sort > .check-manifest; \
+ sort MANIFEST > .orig-manifest; \
+ diff -u .orig-manifest .check-manifest; rv=$$?; \
+ rm -f .orig-manifest .check-manifest; \
+ exit $$rv
+
+.PHONY: all opt depend install clean distclean configure dist check-manifest \
+ release release_stage_2 release_stage_3 force
\ No newline at end of file
Then:
make
- make -C po # if you want to rebuild the message catalogs
The binaries are called things like 'virt-dmesg.opt' and located in
the respective directories, so you could run them by doing:
- dmesg/virt-dmesg.opt
+ ./dmesg/virt-dmesg.opt
All the binaries understand the --help option to provide a summary of
options. All require virtual machines to run against, but most also
root:
make install
- make -C po install
\ No newline at end of file
dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html
for d in virt-mem; do
f=`echo $d | tr - _`_gettext.ml
- AC_MSG_NOTICE([creating $f])
- rm -f $f
- echo "(* This file is generated automatically by ./configure. *)" > $f
+ AC_MSG_NOTICE([creating lib/$f])
+ rm -f lib/$f
+ echo "(* This file is generated automatically by ./configure. *)" > lib/$f
if test "x$pkg_gettext" != "xno"; then
# Gettext module is available, so use it.
- cat <<EOT >>$f
+ cat <<EOT >>lib/$f
module Gettext = Gettext.Program (
struct
let textdomain = "$d"
EOT
else
# No gettext module is available, so fake the translation functions.
- cat <<EOT >>$f
+ cat <<EOT >>lib/$f
module Gettext = struct
external s_ : string -> string = "%identity"
external f_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format
dnl Produce output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
+ Make.rules
+ lib/Makefile
+ uname/Makefile
+ dmesg/Makefile
po/Makefile
])
AC_OUTPUT
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
OCAMLOPTLIBS = -linkpkg bitmatch.cmxa
-OCAMLDOCFLAGS = -html -stars -sort $(OCAMLCPACKAGES) $(SYNTAX)
+OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
-TARGETS = virt-mem virt-mem.opt
+OCAMLDEPFLAGS = $(SYNTAX)
-OBJS = virt_mem_gettext.cmo \
- virt_mem_utils.cmo \
- virt_mem_mmap.cmo \
- virt_mem.cmo
-XOBJS = virt_mem_gettext.cmx \
- virt_mem_utils.cmx \
- virt_mem_mmap.cmx \
- virt_mem.cmx
+TARGETS =
all: $(TARGETS)
-virt-mem: $(OBJS)
- ocamlfind ocamlc \
- $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $^ -o $@
-
-virt-mem.opt: $(XOBJS)
- ocamlfind ocamlopt \
- $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $^ -o $@
-
-# Common rules for building OCaml objects.
-
-.mli.cmi:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmo:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmx:
- ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
-
-clean:
- rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
- *.so *.opt *~ *.dll *.exe *.annot core
-
-# Distribution.
-
-dist:
- $(MAKE) check-manifest
- rm -rf $(PACKAGE)-$(VERSION)
- mkdir $(PACKAGE)-$(VERSION)
- tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
- $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
- tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
- ls -l $(PACKAGE)-$(VERSION).tar.gz
-
-check-manifest:
- hg manifest | sort > .check-manifest; \
- sort MANIFEST > .orig-manifest; \
- diff -u .orig-manifest .check-manifest; rv=$$?; \
- rm -f .orig-manifest .check-manifest; \
- exit $$rv
-
-# Developer documentation (in html/ subdirectory).
-
-doc:
- rm -rf html
- mkdir html
- -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html *.{ml,mli}
-
-# Dependencies.
-
-depend: .depend
-
-.depend: $(wildcard *.mli) $(wildcard *.ml)
- rm -f .depend
- ocamldep $(SYNTAX) $^ > $@
-
-ifeq ($(wildcard .depend),.depend)
-include .depend
-endif
-
-.PHONY: all opt depend install clean distclean configure dist check-manifest \
- release release_stage_2 release_stage_3 force
+#virt-mem: $(OBJS)
+# ocamlfind ocamlc \
+# $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $^ -o $@
+#
+#virt-mem.opt: $(XOBJS)
+# ocamlfind ocamlopt \
+# $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $^ -o $@
-.SUFFIXES: .cmo .cmi .cmx .ml .mli
+include ../Make.rules
\ No newline at end of file
--- /dev/null
+virt_mem_mmap.cmi: virt_mem_utils.cmo /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+virt_mem.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi \
+ /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+virt_mem.cmx: virt_mem_utils.cmx virt_mem_mmap.cmx \
+ /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+virt_mem_mmap.cmo: virt_mem_utils.cmo /usr/lib64/ocaml/bitmatch/bitmatch.cmi \
+ virt_mem_mmap.cmi
+virt_mem_mmap.cmx: virt_mem_utils.cmx /usr/lib64/ocaml/bitmatch/bitmatch.cmi \
+ virt_mem_mmap.cmi
+virt_mem_utils.cmo: /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+virt_mem_utils.cmx: /usr/lib64/ocaml/bitmatch/bitmatch.cmi
INSTALL = @INSTALL@
-SYNTAX = -pp "camlp4o -I`ocamlc -where`/bitmatch bitmatch.cma pa_bitmatch.cmo"
+SYNTAX = -pp "camlp4o -I$$(ocamlc -where)/bitmatch bitmatch.cma pa_bitmatch.cmo"
#OCAMLCPACKAGES = -package unix,bigarray,extlib,bitmatch
OCAMLCPACKAGES = -package unix,bigarray,extlib -I +bitmatch
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
OCAMLOPTLIBS = -linkpkg bitmatch.cmxa
-OCAMLDOCFLAGS = -html -stars -sort $(OCAMLCPACKAGES) $(SYNTAX)
+OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
-TARGETS = virt-mem virt-mem.opt
+OCAMLDEPFLAGS = $(SYNTAX)
+
+TARGETS = virt_mem.cma virt_mem.cmxa
OBJS = virt_mem_gettext.cmo \
virt_mem_utils.cmo \
all: $(TARGETS)
-virt-mem: $(OBJS)
- ocamlfind ocamlc \
- $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $^ -o $@
-
-virt-mem.opt: $(XOBJS)
- ocamlfind ocamlopt \
- $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $^ -o $@
-
-# Common rules for building OCaml objects.
-
-.mli.cmi:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmo:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmx:
- ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
-
-clean:
- rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
- *.so *.opt *~ *.dll *.exe *.annot core
-
-# Distribution.
-
-dist:
- $(MAKE) check-manifest
- rm -rf $(PACKAGE)-$(VERSION)
- mkdir $(PACKAGE)-$(VERSION)
- tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
- $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
- tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
- ls -l $(PACKAGE)-$(VERSION).tar.gz
-
-check-manifest:
- hg manifest | sort > .check-manifest; \
- sort MANIFEST > .orig-manifest; \
- diff -u .orig-manifest .check-manifest; rv=$$?; \
- rm -f .orig-manifest .check-manifest; \
- exit $$rv
-
-# Developer documentation (in html/ subdirectory).
-
-doc:
- rm -rf html
- mkdir html
- -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html *.{ml,mli}
-
-# Dependencies.
-
-depend: .depend
-
-.depend: $(wildcard *.mli) $(wildcard *.ml)
- rm -f .depend
- ocamldep $(SYNTAX) $^ > $@
-
-ifeq ($(wildcard .depend),.depend)
-include .depend
-endif
+virt_mem.cma: $(OBJS)
+ ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -a -o $@ $^
-.PHONY: all opt depend install clean distclean configure dist check-manifest \
- release release_stage_2 release_stage_3 force
+virt_mem.cmxa: $(XOBJS)
+ ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -a -o $@ $^
-.SUFFIXES: .cmo .cmi .cmx .ml .mli
+include ../Make.rules
\ No newline at end of file
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-OCAML_GETTEXT_PACKAGE = virt-df
+OCAML_GETTEXT_PACKAGE = virt-mem
LINGUAS = $(shell cat LINGUAS)
SOURCES = POTFILES
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
OCAMLOPTLIBS = -linkpkg bitmatch.cmxa
-OCAMLDOCFLAGS = -html -stars -sort $(OCAMLCPACKAGES) $(SYNTAX)
+OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX)
-TARGETS = virt-mem virt-mem.opt
+OCAMLDEPFLAGS = $(SYNTAX)
-OBJS = virt_mem_gettext.cmo \
- virt_mem_utils.cmo \
- virt_mem_mmap.cmo \
- virt_mem.cmo
-XOBJS = virt_mem_gettext.cmx \
- virt_mem_utils.cmx \
- virt_mem_mmap.cmx \
- virt_mem.cmx
+TARGETS =
all: $(TARGETS)
-virt-mem: $(OBJS)
- ocamlfind ocamlc \
- $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $^ -o $@
-
-virt-mem.opt: $(XOBJS)
- ocamlfind ocamlopt \
- $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $^ -o $@
-
-# Common rules for building OCaml objects.
-
-.mli.cmi:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmo:
- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) -c $<
-.ml.cmx:
- ocamlfind ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
-
-clean:
- rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
- *.so *.opt *~ *.dll *.exe *.annot core
-
-# Distribution.
-
-dist:
- $(MAKE) check-manifest
- rm -rf $(PACKAGE)-$(VERSION)
- mkdir $(PACKAGE)-$(VERSION)
- tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
- $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
- tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
- ls -l $(PACKAGE)-$(VERSION).tar.gz
-
-check-manifest:
- hg manifest | sort > .check-manifest; \
- sort MANIFEST > .orig-manifest; \
- diff -u .orig-manifest .check-manifest; rv=$$?; \
- rm -f .orig-manifest .check-manifest; \
- exit $$rv
-
-# Developer documentation (in html/ subdirectory).
-
-doc:
- rm -rf html
- mkdir html
- -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html *.{ml,mli}
-
-# Dependencies.
-
-depend: .depend
-
-.depend: $(wildcard *.mli) $(wildcard *.ml)
- rm -f .depend
- ocamldep $(SYNTAX) $^ > $@
-
-ifeq ($(wildcard .depend),.depend)
-include .depend
-endif
-
-.PHONY: all opt depend install clean distclean configure dist check-manifest \
- release release_stage_2 release_stage_3 force
+#virt-mem: $(OBJS)
+# ocamlfind ocamlc \
+# $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) $^ -o $@
+#
+#virt-mem.opt: $(XOBJS)
+# ocamlfind ocamlopt \
+# $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $^ -o $@
-.SUFFIXES: .cmo .cmi .cmx .ml .mli
+include ../Make.rules
\ No newline at end of file