VERSION = @PACKAGE_VERSION@
INSTALL = @INSTALL@
+datarootdir = @datarootdir@
+mandir = @mandir@
HAVE_PERLDOC = @HAVE_PERLDOC@
TOOLS = uname dmesg
-SUBDIRS = lib $(TOOLS)
-
ifeq ($(HAVE_PERLDOC),perldoc)
-TARGETS += virt-mem.1 virt-mem.txt $(TOOLS:%=virt-%.1)
+MANPAGES = virt-mem.1 $(TOOLS:%=virt-%.1)
+TEXTMANPAGES = virt-mem.txt
endif
-all install: $(TARGETS)
- for d in $(SUBDIRS) po; do \
+TARGETS = $(MANPAGES) $(TEXTMANPAGES)
+
+all: $(TARGETS)
+ for d in lib $(TOOLS) po; do \
+ $(MAKE) -C $$d $@; \
+ if [ $$? -ne 0 ]; then exit 1; fi; \
+ done
+
+install: install-man
+ for d in lib $(TOOLS) po; do \
$(MAKE) -C $$d $@; \
if [ $$? -ne 0 ]; then exit 1; fi; \
done
depend doc:
- for d in $(SUBDIRS); do \
+ for d in lib $(TOOLS); do \
$(MAKE) -C $$d $@; \
if [ $$? -ne 0 ]; then exit 1; fi; \
done
clean:
- for d in . $(SUBDIRS); do \
+ for d in . lib $(TOOLS); do \
(cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
*.so *.opt *~ *.dll *.exe *.annot core); \
done
virt-%.1:
echo '.so man1/virt-mem.1' > $@
+
+install-man:
+ $(INSTALL) -m 0644 $(MANPAGES) $(DESTDIR)$(mandir)/man1/
+
+else
+
+install-man:
+
endif
# Distribution.
VERSION = @PACKAGE_VERSION@
INSTALL = @INSTALL@
+bindir = @bindir@
SYNTAX = -pp "camlp4o -I$$(ocamlc -where)/bitmatch bitmatch.cma pa_bitmatch.cmo"
ocamlfind ocamlopt \
$(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $(XOBJS) -o $@
+install:
+ if [ -x virt-dmesg.opt ]; then \
+ $(INSTALL) -m 0755 virt-dmesg.opt $(DESTDIR)$(bindir)/virt-dmesg; \
+ fi
+
include ../Make.rules
\ No newline at end of file
VERSION = @PACKAGE_VERSION@
INSTALL = @INSTALL@
+bindir = @bindir@
SYNTAX = -pp "camlp4o -I$$(ocamlc -where)/bitmatch bitmatch.cma pa_bitmatch.cmo"
ocamlfind ocamlopt \
$(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $(OCAMLOPTLIBS) $(XOBJS) -o $@
+install:
+ if [ -x virt-uname.opt ]; then \
+ $(INSTALL) -m 0755 virt-uname.opt $(DESTDIR)$(bindir)/virt-uname; \
+ fi
+
include ../Make.rules
\ No newline at end of file