diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-11-23 19:28:03 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-11-23 19:28:03 +0000 |
commit | dd13d5775af0d79d92e30c21cea69f2802e2bcf1 (patch) | |
tree | 312aad5943e51e2a3d0f2e5152616f8be3f4af60 /tools/ocaml/Makefile | |
parent | 46d89e453b861697531e268dbd85dfd65cdfae7d (diff) | |
download | xen-dd13d5775af0d79d92e30c21cea69f2802e2bcf1.tar.gz xen-dd13d5775af0d79d92e30c21cea69f2802e2bcf1.tar.bz2 xen-dd13d5775af0d79d92e30c21cea69f2802e2bcf1.zip |
ocaml: install built modules
Previously the install target was having no effect because it ended up
calling the default target in the subdir Makefile instead of the
install target.
Resolve this by tying the tools/ocaml Makefiles into the generic
handling done by tools/Rules.mk.
Other changes arising in one way or another from this:
- Add libs/xl/META.in
- Update .hgignore for META files
- Create leading directories
- Remove existing module before installation in install targer
(worksaround what appears to be a quirk of "ocamlfind install")
- Use the globally defined $(DESTDIR)
- Move "ocamlfind printfconf destdir" to a common variable,
repurposing exising unused OCAMLDESTDIR, incorporating $(DESTDIR) at
the same time.
- Drop a few unused variabe definitions (mainly to avoid deciding if
$(DESTDIR) made sense for them or not.
- Pass -destdir to ocamlfind in uninstall target for symmetry with
install target.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/ocaml/Makefile')
-rw-r--r-- | tools/ocaml/Makefile | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile index 5171c62434..9964631e51 100644 --- a/tools/ocaml/Makefile +++ b/tools/ocaml/Makefile @@ -1,43 +1,19 @@ XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Rules.mk -SUBDIRS_LIBS = \ - libs/uuid libs/mmap \ - libs/log libs/xc libs/eventchn \ - libs/xb libs/xs libs/xl - SUBDIRS_PROGRAMS = xenstored -SUBDIRS = $(SUBDIRS_LIBS) $(SUBDIRS_PROGRAMS) +SUBDIRS = libs $(SUBDIRS_PROGRAMS) .NOTPARALLEL: # targets here must be run in order, otherwise we can try # to build programs before the libraries are done .PHONY: all -all: build - -.PHONY: build -build: SUBDIRS - -.PHONY: SUBDIRS SUBDIRS_PROGRAMS SUBDIRS_LIBS -SUBDIRS SUBDIRS_PROGRAMS SUBDIRS_LIBS: - @set -e; for d in $($@); do \ - echo " === building $$d"; \ - $(MAKE) --no-print-directory -C $$d; \ - done - -.PHONY: install install-libs install-program -install: install-libs install-program - -install-program: SUBDIRS_PROGRAMS - $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) - $(INSTALL_PROG) xenstored/oxenstored $(DESTDIR)$(SBINDIR) +all: subdirs-all -install-libs: SUBDIRS_LIBS +.PHONY: install +install: subdirs-install .PHONY: clean -clean: - @for dir in $(SUBDIRS); do \ - $(MAKE) --no-print-directory -C $$dir clean; \ - done +clean: subdirs-clean |