]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
[refactoring] Create new targets for binary generated by components of xen-api-libs.hg
authorDavid Scott <dave.scott@eu.citrix.com>
Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)
committerDavid Scott <dave.scott@eu.citrix.com>
Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)
By default, these binaries will be installed on /opt/xensource/libexec

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
Makefile
close-and-exec/Makefile
pciutil/Makefile
rebuild
sexpr/Makefile
stdext/Makefile
xml-light2/Makefile

index 632d22f12c8e1e4afd88105a2b5dea16ebc656b4..c61ebab1f21dd97e8b02afba6210e5cb674dc4b3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,21 @@ bins:
        $(MAKE) -C xml-light2 bins
        $(MAKE) -C sexpr bins
        $(MAKE) -C stdext bins
-
+       $(MAKE) -C close-and-exec bins
+
+bininstall:
+       $(MAKE) -C pciutil bininstall
+       $(MAKE) -C xml-light2 bininstall
+       $(MAKE) -C sexpr bininstall
+       $(MAKE) -C stdext bininstall
+       $(MAKE) -C close-and-exec bininstall
+
+binuninstall:
+       $(MAKE) -C pciutil binuninstall
+       $(MAKE) -C xml-light2 binuninstall
+       $(MAKE) -C sexpr binuninstall
+       $(MAKE) -C stdext binuninstall
+       $(MAKE) -C close-and-exec binuninstall
 
 OUTPUT_API_PKG := $(MY_OUTPUT_DIR)/api-libs.tar.gz
 
@@ -93,9 +107,12 @@ $(OUTPUT_API_PKG): PREFIX=$(shell ocamlfind printconf path)
 $(OUTPUT_API_PKG): $(MY_OBJ_DIR)/.dirstamp $(MY_OUTPUT_DIR)/.dirstamp
        rm -rf $(DESTDIR)
        mkdir -p $(DESTDIR)$(PREFIX)
+       mkdir -p $(DESTDIR)$(LIBEXEC)
        $(MAKE) clean
        $(MAKE) all
        $(MAKE) DESTDIR=$(MY_OBJ_DIR)/staging install
+       $(MAKE) bins
+       $(MAKE) DESTDIR=$(MY_OBJ_DIR)/staging bininstall
        tar -C $(DESTDIR) -zcf $@ .
 
 OUTPUT_XAPI_PKG := $(MY_OUTPUT_DIR)/xapi-libs.tar.gz
index 54848ed7df0899ac34389488dd7c6247cca4b51b..9c982a2c237894503bb6b1abbb437d678a85afc5 100644 (file)
@@ -1,3 +1,4 @@
+IPROG=install -m 755 -o root -g root
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
@@ -5,6 +6,7 @@ OCAMLOPT = ocamlopt
 
 LDFLAGS = -cclib -L./
 
+LIBEXEC  = "/opt/xensource/libexec"
 DESTDIR ?= /
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes
@@ -53,9 +55,18 @@ META: META.in
 install: $(LIBS) META
        ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore close-and-exec META $(INTF) $(LIBS) *.a *.cmx
 
+.PHONY: bininstall
+bininstall:
+       mkdir -p $(DESDIR)$(LIBEXEC)
+       $(IPROG) $(PROGRAMS) $(DESDIR)$(LIBEXEC)
+
 .PHONY: uninstall
 uninstall:
        ocamlfind remove close-and-exec
 
+.PHONY: binuninstall
+binuninstall:
+       rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS)
+
 clean:
        rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS)
\ No newline at end of file
index 06aa95b64ab8e83e3b6f022157a78165845157dc..3adf0cbe60da71cba71d34b59aa9f3d37cbfb130 100644 (file)
@@ -1,3 +1,4 @@
+IPROG=install -m 755 -o root -g root
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
@@ -5,6 +6,7 @@ OCAMLOPT = ocamlopt
 
 LDFLAGS = -cclib -L./
 
+LIBEXEC = "/opt/xensource/libexec"
 DESTDIR ?= /
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes
@@ -53,9 +55,18 @@ META: META.in
 install: $(LIBS) META
        ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore pciutil META $(INTF) $(LIBS) *.a *.cmx
 
+.PHONY: bininstall
+bininstall:
+       mkdir -p $(DESDIR)$(LIBEXEC)
+       $(IPROG) $(PROGRAMS) $(DESDIR)$(LIBEXEC)
+
 .PHONY: uninstall
 uninstall:
        ocamlfind remove pciutil
 
+.PHONY: binuninstall
+binuninstall:
+       rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS)
+
 clean:
        rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS)
\ No newline at end of file
diff --git a/rebuild b/rebuild
index dabd578f502c0c524f170222b0f32c8e3d916e97..2d0d72bc8b84387aea3fbc60afa554efcebb3830 100755 (executable)
--- a/rebuild
+++ b/rebuild
@@ -2,5 +2,5 @@
 
 set -e 
 make clean; make cleanxen;
-make uninstall; make uninstallxen;
-make all && make bins && make install && make allxen && make installxen
+make uninstall; make uninstallxen; make binuninstall
+make all && make bins && make install && make allxen && make installxen && make bininstall
index 5bb73aa38966aa7b7169f929d4b87aab0073980a..44a0e24d5c3f8aa5b0bfcf8ebdfc6fa7a3389939 100644 (file)
@@ -1,3 +1,4 @@
+IPROG=install -m 755 -o root -g root
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
@@ -7,6 +8,7 @@ OCAMLYACC = ocamlyacc
 
 LDFLAGS = -cclib -L./
 
+LIBEXEC  = "/opt/xensource/libexec"
 DESTDIR ?= /
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes
@@ -67,9 +69,18 @@ META: META.in
 install: $(LIBS) META
        ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore sexpr META $(INTF) $(LIBS) *.a *.cmx
 
+.PHONY: bininstall
+bininstall:
+       mkdir -p $(DESDIR)$(LIBEXEC)
+       $(IPROG) $(PROGRAMS) $(DESDIR)$(LIBEXEC)
+
 .PHONY: uninstall
 uninstall:
        ocamlfind remove sexpr
 
+.PHONY: binuninstall
+binuninstall:
+       rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS)
+
 clean:
        rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot sExprLexer.ml{,i} sExprParser.ml{,i} $(LIBS) $(PROGRAMS)
\ No newline at end of file
index c9c5cd3fab1adc8a1b2e3b456efc283376fd52fb..d66774b558107f4af34c58405c883b10f88131b7 100644 (file)
@@ -1,3 +1,4 @@
+IPROG=install -m 755 -o root -g root
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
@@ -5,6 +6,7 @@ OCAMLOPT = ocamlopt
 
 LDFLAGS = -cclib -L./
 
+LIBEXEC = "/opt/xensource/libexec/"
 DESTDIR ?= /
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes
@@ -98,10 +100,19 @@ META: META.in
 install: $(LIBS) META
        ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore stdext META $(INTF) $(LIBS) *.a *.so *.cmx
 
+.PHONY: bininstall
+bininstall:
+       mkdir -p $(DESDIR)$(LIBEXEC)
+       $(IPROG) $(PROGRAMS) $(DESDIR)$(LIBEXEC)
+
 .PHONY: uninstall
 uninstall:
        ocamlfind remove stdext
 
+.PHONY: binuninstall
+binuninstall:
+       rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS)
+
 clean:
        rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS)
 
index 3c5447f8084a375879d0f42ff041242e184e1175..daa7267fa1cf18a6378177ea2bf99dbcd14c4d9f 100644 (file)
@@ -1,3 +1,4 @@
+IPROG=install -m 755 -o root -g root
 OCAMLPACKS = xmlm
 
 CC = gcc
@@ -11,6 +12,7 @@ OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLFINDFLAGS)
 
 LDFLAGS = -cclib -L./
 
+LIBEXEC  = "/opt/xensource/libexec"
 DESTDIR ?= /
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes
@@ -58,10 +60,19 @@ META: META.in
 install: $(LIBS) META
        ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore xml-light2 META $(INTF) $(LIBS) *.a *.cmx
 
+.PHONY: bininstall
+bininstall:
+       mkdir -p $(DESDIR)$(LIBEXEC)
+       $(IPROG) $(PROGRAMS) $(DESDIR)$(LIBEXEC)
+
 .PHONY: uninstall
 uninstall:
        ocamlfind remove xml-light2
 
+.PHONY: binuninstall
+binuninstall:
+       rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS)
+
 clean:
        rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS)