diff --git a/Makefile b/Makefile index 7049065..1806f0d 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ GOBUILDDIR = $(BUILDDIR)/gobuild STAGEDIR = $(BUILDDIR)/stage OBJECTDIR = $(BUILDDIR)/obj DISTDIR = $(BUILDDIR)/dist +VENDORDIR = $(REPO)/vendor/$(shell basename $(REPO)) OBJECTS := OBJECTS += $(OBJECTDIR)/xe-daemon @@ -51,6 +52,7 @@ clean: $(RM) -rf $(BUILDDIR) $(DISTDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_$(ARCH).tgz: $(OBJECTS) + $(info ***** Create build direcotry *****) ( mkdir -p $(DISTDIR) ; \ install -d $(STAGEDIR)/etc/init.d/ ; \ install -m 755 $(SOURCEDIR)/xe-linux-distribution.init $(STAGEDIR)/etc/init.d/xe-linux-distribution ; \ @@ -74,14 +76,25 @@ $(DISTDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_$(ARCH).tgz: $(OBJECTS) ) $(OBJECTDIR)/xe-daemon: $(XE_DAEMON_SOURCES:%=$(GOBUILDDIR)/%) + $(info ***** Build xe-daemon ******) + (cd $(VENDORDIR) && ln -sfn ../../build/gobuild/guestmetric guestmetric) + (cd $(VENDORDIR) && ln -sfn ../../build/gobuild/syslog syslog) + (cd $(VENDORDIR) && ln -sfn ../../build/gobuild/system system) + (cd $(VENDORDIR) && ln -sfn ../../build/gobuild/xenstoreclient xenstoreclient) mkdir -p $(OBJECTDIR) $(GO_BUILD) $(GO_FLAGS) -o $@ $< -$(OBJECTDIR)/xenstore: $(XENSTORE_SOURCES:%=$(GOBUILDDIR)/%) $(GOROOT) +$(OBJECTDIR)/xenstore: $(XENSTORE_SOURCES:%=$(GOBUILDDIR)/%) + $(info ***** Build xenstore ******) mkdir -p $(OBJECTDIR) $(GO_BUILD) $(GO_FLAGS) -o $@ $< + (cd $(VENDORDIR) && ln -sfn ../../guestmetric guestmetric) + (cd $(VENDORDIR) && ln -sfn ../../syslog syslog) + (cd $(VENDORDIR) && ln -sfn ../../system system) + (cd $(VENDORDIR) && ln -sfn ../../xenstoreclient xenstoreclient) $(GOBUILDDIR)/%: $(REPO)/% + $(info ****** Replace product version for: [$<] *****) mkdir -p $$(dirname $@) cat $< | \ sed -e "s/@PRODUCT_MAJOR_VERSION@/$(PRODUCT_MAJOR_VERSION)/g" | \ @@ -89,4 +102,3 @@ $(GOBUILDDIR)/%: $(REPO)/% sed -e "s/@PRODUCT_MICRO_VERSION@/$(PRODUCT_MICRO_VERSION)/g" | \ sed -e "s/@NUMERIC_BUILD_NUMBER@/$(RELEASE)/g" \ > $@ - diff --git a/vendor/xe-guest-utilities/xenstoreclient b/vendor/xe-guest-utilities/xenstoreclient index 3fe63d2..4a1a5f3 120000 --- a/vendor/xe-guest-utilities/xenstoreclient +++ b/vendor/xe-guest-utilities/xenstoreclient @@ -1 +1 @@ -../../xenstoreclient/ \ No newline at end of file +../../xenstoreclient \ No newline at end of file