From patchwork Sun Sep 14 11:07:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 389039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id BA2C214016A for ; Sun, 14 Sep 2014 21:08:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6743891CC1; Sun, 14 Sep 2014 11:08:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uyp+qOqRD1xo; Sun, 14 Sep 2014 11:08:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 926A4902F1; Sun, 14 Sep 2014 11:08:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9ABFF1C0F18 for ; Sun, 14 Sep 2014 11:08:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8B4E33369D for ; Sun, 14 Sep 2014 11:08:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xi5-s-wwpgtC for ; Sun, 14 Sep 2014 11:08:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by silver.osuosl.org (Postfix) with ESMTPS id 8897B31716 for ; Sun, 14 Sep 2014 11:08:03 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id n12so2666455wgh.29 for ; Sun, 14 Sep 2014 04:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=07f0yHaTMtDHJ/FsnN01JgECJSkR/UeNV4aPJMN2zpY=; b=eNDBytc5hn5CrcLh56c9G2XEQwBKnSLobFzfr9S1WP91nZmWGcEde8g8GuY8DpR8HO ZZpDxB/gN01c44Ddg3aE8CMfYh375ylNDpBB3wyR8QoKEl+MQYduTdlvd1Vc5/1F4B79 ps5j1ey/lCpwh2ugpAGGwqEMbNiL/SpH36/4bfmZ04sXREwat9C07wV+A6CmC4VPE8fO 4vmL6Po/MYISNAVqUBMhQtUqrVXcOBqiXy97RpLwvIkKMgCJhBOpi7t0lym7Cly/K9bw NGjwz0PioE+Q0noj9sORHtKuMfJEqbRMCaSA0LSLOFUDjfMQvFbzx9pin+x06bChPa5S VTLA== X-Received: by 10.180.108.176 with SMTP id hl16mr15973238wib.4.1410692882103; Sun, 14 Sep 2014 04:08:02 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id w10sm10800882wje.10.2014.09.14.04.08.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Sep 2014 04:08:01 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 14 Sep 2014 13:07:37 +0200 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: Thomas De Schampheleire Subject: [Buildroot] [PATCH 03/23 v5] gendoc infra: avoid a2x warning X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Samuel Martin Though the --destination-dir option works as expected, a2x displays the following message when generating the pdf and text manual: a2x: WARNING: --destination-dir option is only applicable to HTML based outputs To avoid this warning, we now just build the manual in its build location, then move the generated files into $(O)/docs/manual. Reported-by: Thomas Petazzoni Cc: Thomas De Schampheleire Signed-off-by: Samuel Martin [yann.morin.1998@free.fr: tested all but PDF] Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- docs/manual/manual.mk | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk index e86f872..09d8b18 100644 --- a/docs/manual/manual.mk +++ b/docs/manual/manual.mk @@ -70,6 +70,19 @@ ifneq ($$(wildcard $$(MANUAL_$(2)_ASCIIDOC_CONF)),) MANUAL_$(2)_ASCIIDOC_OPTS += -f $$(MANUAL_$(2)_ASCIIDOC_CONF) endif +# Handle a2x warning about --destination-dir option only applicable to HTML +# based outputs. So: +# - use the --destination-dir option if possible (html and split-html), +# - otherwise copy the generated manual to the output directory +MANUAL_$(2)_A2X_OPTS = +ifneq ($$(filter $(3),html split-html),) +MANUAL_$(2)_A2X_OPTS += --destination-dir="$$(@D)" +else +define MANUAL_$(2)_INSTALL_CMDS + $$(Q)cp -f $$(BUILD_DIR)/$(1)/$(1).$(4) $$(@D) +endef +endif + $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \ $$($$(call UPPERCASE,$(1))_SOURCES) \ manual-check-dependencies \ @@ -78,9 +91,11 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \ $$(Q)$$(call MESSAGE,"Generating $(5) $(1)...") $$(Q)mkdir -p $$(@D) $$(Q)a2x $(6) -f $(2) -d book -L -r $$(TOPDIR)/docs/images \ + $$(MANUAL_$(2)_A2X_OPTS) \ --asciidoc-opts="$$(MANUAL_$(2)_ASCIIDOC_OPTS)" \ - -D $$(@D) \ $$(BUILD_DIR)/$(1)/$(1).txt +# install the generated manual + $$(MANUAL_$(2)_INSTALL_CMDS) endef ################################################################################