From patchwork Mon Oct 7 15:13:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Rosbrook X-Patchwork-Id: 11177821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD160139A for ; Mon, 7 Oct 2019 15:16:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B84502053B for ; Mon, 7 Oct 2019 15:16:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CrEnvkIZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B84502053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iHUjG-00084E-2M; Mon, 07 Oct 2019 15:15:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iHUjE-00082t-QD for xen-devel@lists.xenproject.org; Mon, 07 Oct 2019 15:15:16 +0000 X-Inumbo-ID: 0def32fa-e915-11e9-96dc-bc764e2007e4 Received: from mail-qt1-x843.google.com (unknown [2607:f8b0:4864:20::843]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0def32fa-e915-11e9-96dc-bc764e2007e4; Mon, 07 Oct 2019 15:13:45 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id i26so2649164qtm.8 for ; Mon, 07 Oct 2019 08:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kvMRRDeFGz3La7BwkyLtN0z6mdrA0mBRQOwdoAFLP9o=; b=CrEnvkIZHANb9rBG7umd0oOB3174KlgzlcYsfku8FS0Q+5YvL1Yx+uW+ZU2rQHvpGR 5aQKNNwkas9dEyhnTvPFe7E3X4rp5Lc7pZ3CUOGWUW0FOPzZZcOvZV8AiBqlUTQ4yeau W7GqLOyd0XX0TTCiIiH7Bs/Dcoc1Rbwr6crOSM1gM2uPzUy/qM9YF9Qm0z+PoPC/H9HP 1MmLQ/XZ2Fx4Zcsaya5uZ8yRr/XXE8sLQXN5O3blKq7YJ0v6s50sBuVO0GlvjCHOkj/6 3z8vNR19g2A1alVmwhzPOAgcxhXSCrUqfdFnndLfltlcQePWQEuCF0HxvjeuCDgS5eC6 E/oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kvMRRDeFGz3La7BwkyLtN0z6mdrA0mBRQOwdoAFLP9o=; b=jsRWuOt8T8VihrY1eOBE3VT+4QGzuPVjzl4Ge2rwsBaZqXI8rZctv/V5lLi6BJJ19Q u4qM/T+iL+1otOXMFV6JCqtN+RBfNZN8oYoE6p9m6ZbDDkDmXk7LRETLAADJqTKB/LAw OAhGdubh5SQXH7D49Kudwa5F9f8jr9GHHkUisrtdqCJdIVpqp93LBXrawte7JIElUGno 92e6oFDZ6KgV9Cj/xS4fY8vr/OZQ6oKHjow9nI0WQEfeo6Rb09tj5OCSJZ/GiyNJ06QA KgMn/2lLinrWe2x1JooeQ0Hcd56bWCu4UR+N9Lr3Ai0YUZVYFWBifac/a6vKyQle9ySO tijQ== X-Gm-Message-State: APjAAAXw2VX+0Q/Y0hR6VAeQPbJfBU1svYHEGtQU3g3Q/OEc72FHXDVl OD3n2EZk2QuMzFkQSVq39wFbDUZc X-Google-Smtp-Source: APXvYqxbecImauCKsuI4JW9uTAJ3BcsocECJYXxYX3WOjmUObZZ0o5FZWp0kB6iz4hXkXuTxVJ20hQ== X-Received: by 2002:aed:3c27:: with SMTP id t36mr30945047qte.388.1570461224182; Mon, 07 Oct 2019 08:13:44 -0700 (PDT) Received: from five.crux.rad.ainfosec.com (209-217-208-226.northland.net. [209.217.208.226]) by smtp.googlemail.com with ESMTPSA id c185sm8354313qkg.74.2019.10.07.08.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 08:13:43 -0700 (PDT) From: Nick Rosbrook To: xen-devel@lists.xenproject.org Date: Mon, 7 Oct 2019 11:13:11 -0400 Message-Id: <26d6deae1803591361f7568645bc59b1535d6b88.1570456846.git.rosbrookn@ainfosec.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 24/24] golang/xenlight: add make target for generated files X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Nick Rosbrook , Ian Jackson , kerriganb@ainfosec.com, George Dunlap , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Nick Rosbrook Remove the PKGSOURCES variable since adding xenlight_types.go and xenlight_helpers.go to this list breaks the rest of the Makefile. Add xenlight_%.go target for generated files, and use full file names within install, uninstall and $(XEN_GOPATH)$(GOXL_PKG_DIR) rule. Signed-off-by: Nick Rosbrook --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu tools/golang/xenlight/Makefile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index 0987305224..821a5d48fa 100644 --- a/tools/golang/xenlight/Makefile +++ b/tools/golang/xenlight/Makefile @@ -7,20 +7,22 @@ GOCODE_DIR ?= $(prefix)/share/gocode/ GOXL_PKG_DIR = /src/$(XEN_GOCODE_URL)/xenlight/ GOXL_INSTALL_DIR = $(GOCODE_DIR)$(GOXL_PKG_DIR) -# PKGSOURCES: Files which comprise the distributed source package -PKGSOURCES = xenlight.go - GO ?= go .PHONY: all all: build .PHONY: package -package: $(XEN_GOPATH)$(GOXL_PKG_DIR)$(PKGSOURCES) +package: $(XEN_GOPATH)$(GOXL_PKG_DIR) -$(XEN_GOPATH)/src/$(XEN_GOCODE_URL)/xenlight/$(PKGSOURCES): $(PKGSOURCES) +$(XEN_GOPATH)/src/$(XEN_GOCODE_URL)/xenlight/: xenlight_%.go $(INSTALL_DIR) $(XEN_GOPATH)$(GOXL_PKG_DIR) - $(INSTALL_DATA) $(PKGSOURCES) $(XEN_GOPATH)$(GOXL_PKG_DIR) + $(INSTALL_DATA) xenlight.go $(XEN_GOPATH)$(GOXL_PKG_DIR) + $(INSTALL_DATA) xenlight_types.go $(XEN_GOPATH)$(GOXL_PKG_DIR) + $(INSTALL_DATA) xenlight_helpers.go $(XEN_GOPATH)$(GOXL_PKG_DIR) + +xenlight_%.go: gengotypes.py $(XEN_ROOT)/tools/libxl/libxl_types.idl $(XEN_ROOT)/tools/libxl/idl.py + XEN_ROOT=$(XEN_ROOT) $(PYTHON) gengotypes.py ../../libxl/libxl_types.idl # Go will do its own dependency checking, and not actuall go through # with the build if none of the input files have changed. @@ -36,10 +38,14 @@ build: package .PHONY: install install: build $(INSTALL_DIR) $(DESTDIR)$(GOXL_INSTALL_DIR) - $(INSTALL_DATA) $(XEN_GOPATH)$(GOXL_PKG_DIR)$(PKGSOURCES) $(DESTDIR)$(GOXL_INSTALL_DIR) + $(install_data) $(xen_gopath)$(goxl_pkg_dir)xenlight.go $(destdir)$(goxl_install_dir) + $(install_data) $(xen_gopath)$(goxl_pkg_dir)xenlight_types.go $(destdir)$(goxl_install_dir) + $(install_data) $(xen_gopath)$(goxl_pkg_dir)xenlight_helpers.go $(destdir)$(goxl_install_dir) .PHONY: uninstall - rm -f $(addprefix $(DESTDIR)$(GOXL_INSTALL_DIR)/, $(PKGSOURCES)) + rm -f $(addprefix $(DESTDIR)$(GOXL_INSTALL_DIR)/, xenlight.go) + rm -f $(addprefix $(DESTDIR)$(GOXL_INSTALL_DIR)/, xenlight_types.go) + rm -f $(addprefix $(DESTDIR)$(GOXL_INSTALL_DIR)/, xenlight_helpers.go) .PHONY: clean clean: