From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cDS7IvVz5V6vIgAA0tVLHw (envelope-from ) for ; Sun, 14 Jun 2020 00:48:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4FqSHvVz5V4IaQAA1q6Kng (envelope-from ) for ; Sun, 14 Jun 2020 00:48:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 186459408BB for ; Sun, 14 Jun 2020 00:48:53 +0000 (UTC) Received: from localhost ([::1]:39210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkGpP-0001rj-Ve for larch@yhetil.org; Sat, 13 Jun 2020 20:48:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkGpH-0001rd-1K for guix-devel@gnu.org; Sat, 13 Jun 2020 20:48:43 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:44728) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkGpE-0008HR-NX; Sat, 13 Jun 2020 20:48:42 -0400 Received: by mail-pl1-x62c.google.com with SMTP id bh7so5294371plb.11; Sat, 13 Jun 2020 17:48:29 -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:user-agent:mime-version; bh=4eUE0+YdNoIHXy0we9cwvtrfTsc8X7xpMkhgCc6j0rU=; b=DGLXSc/rCZ+yutTLecRejqRaX0s2cm7nVvRJJpQ4c78F+hcrYIY/EPtlC+hauZ4AsA t/MiaVSXmh/U+cxv0S+ZrEEJcwRdpd2Xegp8qu/lWOsHYK/2XJvbhqYt7LDI/rUjlS2z LVwfLPkg7P6R1yCczgs8A/rR9oI+iiifVyVDw/9m7M+WL2/wGMyQ3+yBS1NZI2fmDHyI yzBy/OFhHmYyTW9JNiCGWKjqRtDAAZyNRNRgxmpOvg2ksGnfuxO1k7ooqLkp5IMMyFk1 2LkHl9LpPen/HY0fS7eNiF4WtfpnZinBEVL9R0eMHnS7zfqM4Xdun69mavyFlT5I41Gq 9yAw== 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:user-agent :mime-version; bh=4eUE0+YdNoIHXy0we9cwvtrfTsc8X7xpMkhgCc6j0rU=; b=RWiKr6N0I3P3Z7oBVU9nssD7bDObtvnuHk/KcDp//1aifu4PbFg4qiG97SwUmMMpMC rkhKKMel+2EuiyioWMvMMgb+390SFcuJ2vIQFx/mCc4nrGb9AqpMYgJmHfAGPX5V7rh8 yyy8xSWqLYEmcTmZ53PkGrjmusgOsMfMTVcHD/0ipV1CbpdzA3EMudbpp1tqhQZ9/+zh MLkEmFIbkiHZJTW+3l/uPkj85rk5PxTpj5SEyF2hocC1dq7I4tpS1VvXjT91bfotr9Q1 6sPfhDFqTXkkDnnew9Y6D98iu4QfjG4HGpNIwr8EiZn1dp/x3CLlpEKxF0oKeSe6feGR uQzQ== X-Gm-Message-State: AOAM531TyMk/8EAMHc18vL0SQlBFPejR6DXG2jAcL2j7iUeYJbgsSqq/ kpQS/3FE+lB2xjx9Tsz4JUrsUnZLUa0= X-Google-Smtp-Source: ABdhPJxvY6Z0cSx5R6MI5J5T2pbwA+fQ4n1AwzoUpJJ0CmbWoypBIE1Qr96nYQqOnL/hmGaEkEVmow== X-Received: by 2002:a17:90a:fe88:: with SMTP id co8mr5330419pjb.209.1592095708209; Sat, 13 Jun 2020 17:48:28 -0700 (PDT) Received: from garuda-lan (c-73-97-103-127.hsd1.wa.comcast.net. [73.97.103.127]) by smtp.gmail.com with ESMTPSA id x197sm9750244pfc.13.2020.06.13.17.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 17:48:27 -0700 (PDT) From: Chris Marusich To: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Makefile logic to create Guix documentation Date: Sat, 13 Jun 2020 17:48:21 -0700 Message-ID: <87lfkqtqui.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=cmmarusich@gmail.com; helo=mail-pl1-x62c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DGLXSc/r; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.31 X-TUID: MY33ULIpYtb9 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ludo, I was reading through the Makefile that creates the documentation, and I came across some parts I couldn't understand, even though I spent a few hours trying to figure it out. I thought you might know the answers to my questions off the top of your head, since I think you wrote it. First, consider this snippet from doc/local.mk: =2D-8<---------------cut here---------------start------------->8--- # We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake) # Extending"). Using the `-local' rules is imperfect, because they may be # triggered after the main rule. Oh, well. pdf-local: $(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.pdf) info-local: $(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.png) ps-local: $(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.eps) \ $(top_srcdir)/%D%/images/coreutils-size-map.eps dvi-local: ps-local =2D-8<---------------cut here---------------end--------------->8--- What is this syntax called? I checked the Make, Automake, and Autoconf manuals, but I couldn't find anything. I'm talking about this syntax: info-local: $(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.png) It looks like when you added this, you intended to add a *.png prerequisite to the info-local target for every equivalent *.dot file that exists. My guess is you want to ensure that the PNG files are generated before the info page gets created, since the PNG files are required in order to build the info page. However, is it possible you meant to write it like the following instead? (The first "=3D" has been replaced with a ":".) info-local: $(DOT_FILES:%.dot=3D$(top_srcdir)/%.png) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 When using ":", I recognize this syntax as a "substitution reference" (see: (make) Substitution Refs). However, I do not know what it is supposed to be when the ":" is replaced with a "=3D". Is it a typo? I experimented by adding a snippet like the following to the generated Makefile... =2D-8<---------------cut here---------------start------------->8--- marucustom: $(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.eps) @echo XXXXX expansion is: _$(DOT_FILES=3D%.dot=3D$(top_srcdir)/%.eps)_ @echo XXXXX prerequisite: $< @echo XXXXX target: $@ =2D-8<---------------cut here---------------end--------------->8--- ...and it seems to cause make to substitute an empty string: =2D-8<---------------cut here---------------start------------->8--- $ make marucustom XXXXX expansion is: __ XXXXX prerequisite: XXXXX target: marucustom =2D-8<---------------cut here---------------end--------------->8--- Second, I noticed some rules like the following: =2D-8<---------------cut here---------------start------------->8--- .dot.eps: $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" =2D-8<---------------cut here---------------end--------------->8--- What I do understand is that AM_V_DOT and DOT are set in Makefile.am and configure.ac, and that they are used to invoke the "dot" program. However, I couldn't quite understand the rest of this rule. Why are there no prerequisites? It looks like the rule doesn't declare any prerequisites, so I'm confused about why the recipe includes references to the name of the first prerequisite ("$<"). What causes this rule to be run? I tried adding echo commands in the recipe like so... =2D-8<---------------cut here---------------start------------->8--- .dot.eps: @echo YYYYY .dot.eps is running @echo YYYYY target: %@ @echo YYYYY prerequisite: _$<_ $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" =2D-8<---------------cut here---------------end--------------->8--- ...but I didn't see new messages when I ran "make" (from a clean checkout). Maybe I didn't invoke make correctly. If you or anyone else could point out if I'm missing something, that'd be really helpful. Thank you in advance! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl7lc9UACgkQ3UCaFdgi Rp318A/8CHtHtxykvXq1Ke/xDzHIyQYr2KEwF/eTCMaI/pswOIF48C61dFiMeAi7 0cxdvJIGe0jf3cDMR0gIoIfka/H8oR/sdg/o6WTszen7BIY8iOaZ8kX725yIOysN t+hjopgcaHLsQn+zrLuCC2O68UZ12qmYR3sCNBzEgPVcGyNJmlsI7VGkLHr08zHE aPSKIpleV2aAun3N/Nr86XJQNd//luREJdEPrEo98cQbYp8GbXEZFlZvtM7x/VoH A2RbKwa2UhqNNOjqrsVq06mjH5xcAp3LRfqzXeWWhGvXfRGsKPdUaHClywE0haJW 1k1RtIuCaJx2Q/+h6c7fRVWhN3sH5dJAr5D/8XW15CUuO/N6sSuJeJRCRZUOq/tV dfgMdWQXet0yuYzoJZ9ISkaXVFNX+kOZtW97cMWWBGXc+XYoSsEi9Vj+KZozA9pR j14aB7eg8Kefk9rUgx/MfS1wLHe5Jci5FJnnJFrwphLkQ8VACYqci6O7GeJsrQry 5HZvsiyCLeN+ixvmp+oZAmbXR8SHxOw0P9j56yRm+39UfuW0iQ8Otcx/X24jNeM5 l+CyLHubNfo2NdJP8DfdkHTgbwJcARbqQqJVdnmzjhKIV5D5yF8pC1kBzOIuPG+F wEGcJ7UvyUYTM6NjjL33UIudWOiu9fVbdZG6g4draXEhlWEetn8= =UUF3 -----END PGP SIGNATURE----- --=-=-=--