From patchwork Fri Aug 15 13:40:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 380227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id A943414009B for ; Fri, 15 Aug 2014 23:41:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 314BE2F349; Fri, 15 Aug 2014 13:41:49 +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 GlyIkrG3NUfF; Fri, 15 Aug 2014 13:41:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 57FE63145A; Fri, 15 Aug 2014 13:41:39 +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 794A41C1774 for ; Fri, 15 Aug 2014 13:41:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6995930C2B for ; Fri, 15 Aug 2014 13:41:36 +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 zGTt4NgI8z8R for ; Fri, 15 Aug 2014 13:41:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by silver.osuosl.org (Postfix) with ESMTPS id 55D4031220 for ; Fri, 15 Aug 2014 13:41:32 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id l4so1979070lbv.16 for ; Fri, 15 Aug 2014 06:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to:cc; bh=dIv3FabHGEYnSBNmY5XPhescGe5jQJAjzYKKZ0+nFvY=; b=cyINd33XUG4URLOukbDGvoZL9D15Jcd8XH2HoEvUyv+I3iPyBwow6TLTSM6epSejkX vbFBY8V2AT/IQrUkWj081XTfnyLwCbk2Er7QfzQ0CEmS591m4vNWypUveYSWU9TCRW7+ qThnAGKBT9YQsVxbsKPfJHvtMyaCDCw0IHj5U7LNI/Xbq3eWgA3iE/LUxKt0TcEf9eCR l2nAfeVD59SujpbBaICktBPPCWnVqpvNF4zGBxxyyqI5+KUQUd6gbhN2bfGXqMpVeZWY OlTavgLBWzZd3nP4c8XSW5bsXLMlTAhlBAW5XguLvh+MTf9zQ6zrzcfJfgvlsamZPr/D sKRg== X-Received: by 10.112.84.199 with SMTP id b7mr11382356lbz.25.1408110090503; Fri, 15 Aug 2014 06:41:30 -0700 (PDT) Received: from [127.0.0.1] (d54C62EEB.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id r8sm5020163laa.34.2014.08.15.06.41.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Aug 2014 06:41:28 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 9d9af165df7bfedeefb652ad02536f13ca008ab3 Message-Id: <9d9af165df7bfedeefb6.1408110035@localhost> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.7.2 Date: Fri, 15 Aug 2014 15:40:35 +0200 From: Thomas De Schampheleire To: buildroot@buildroot.org Cc: samel.martin49@gmail.com, yann.morin.1998@free.fr Subject: [Buildroot] [PATCH 2 of 5 v4 for 2014.08] gendoc infra: use $(pkgname) instead of explicitly passing 'manual' 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net In the gendoc infrastructure, using an assignment of the form FOO = docs/$(1)/bar inside GENDOC_INNER does not work as expected: the $(1) value is empty here and the value of FOO becomes 'docs//bar'. Parameters $(2), $(3), etc. do not have this problem. The specific thing about $(1) is that it is a parameter to GENDOC itself (indicating the document to create) and passed transparently to GENDOC_INNER. This is different from the package infrastructures, where $(1) is set from $(pkgname). In fact, the same strategy could be used by the gendoc infrastructure as well, as $(pkgname) resolves to 'manual' for file docs/manual/manual.mk. This has the advantage that the described problem does not occur. Note that this means that if we want to use the same GENDOC infrastructure for another document, it will have to reside in a separate directory than the manual. Signed-off-by: Thomas De Schampheleire Reviewed-by: Samuel Martin Reviewed-by: "Yann E. MORIN" Tested-by: "Yann E. MORIN" --- v4: fix 'make clean' due to missing replacement of $(1) (Samuel) v3: no changes v2: no changes docs/manual/manual.mk | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff -r 232206819ca1 -r 9d9af165df7b docs/manual/manual.mk --- a/docs/manual/manual.mk Wed Aug 13 11:30:25 2014 +0200 +++ b/docs/manual/manual.mk Sat Aug 09 18:18:58 2014 +0200 @@ -78,16 +78,16 @@ # The variable _SOURCES defines the dependencies. ################################################################################ define GENDOC -$(call GENDOC_INNER,$(1),xhtml,html,html,HTML,--xsltproc-opts "--stringparam toc.section.depth 2") -$(call GENDOC_INNER,$(1),chunked,split-html,chunked,split HTML,--xsltproc-opts "--stringparam toc.section.depth 2") -$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0") -$(call GENDOC_INNER,$(1),text,text,text,text) -$(call GENDOC_INNER,$(1),epub,epub,epub,ePUB) -clean: $(1)-clean -$(1)-clean: - $$(Q)$$(RM) -rf $$(O)/docs/$(1) -.PHONY: $(1) $(1)-clean manual-update-lists +$(call GENDOC_INNER,$(pkgname),xhtml,html,html,HTML,--xsltproc-opts "--stringparam toc.section.depth 2") +$(call GENDOC_INNER,$(pkgname),chunked,split-html,chunked,split HTML,--xsltproc-opts "--stringparam toc.section.depth 2") +$(call GENDOC_INNER,$(pkgname),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0") +$(call GENDOC_INNER,$(pkgname),text,text,text,text) +$(call GENDOC_INNER,$(pkgname),epub,epub,epub,ePUB) +clean: $(pkgname)-clean +$(pkgname)-clean: + $$(Q)$$(RM) -rf $$(O)/docs/$(pkgname) +.PHONY: $(pkgname) $(pkgname)-clean manual-update-lists endef MANUAL_SOURCES = $(sort $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)) -$(eval $(call GENDOC,manual)) +$(eval $(call GENDOC))