From: "Ludovic Courtès" <ludo@gnu.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Makefile logic to create Guix documentation
Date: Tue, 16 Jun 2020 11:40:56 +0200 [thread overview]
Message-ID: <87eeqfwdp3.fsf@gnu.org> (raw)
In-Reply-To: <87lfkqtqui.fsf@gmail.com> (Chris Marusich's message of "Sat, 13 Jun 2020 17:48:21 -0700")
Hi,
Chris Marusich <cmmarusich@gmail.com> skribis:
> First, consider this snippet from doc/local.mk:
>
> # 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=%.dot=$(top_srcdir)/%.pdf)
> info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
> ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
> $(top_srcdir)/%D%/images/coreutils-size-map.eps
> dvi-local: ps-local
>
>
> 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=%.dot=$(top_srcdir)/%.png)
These are GNU Make substitutions (info "(make) Substitution Refs").
> 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 "=" has been
> replaced with a ":".)
>
> info-local: $(DOT_FILES:%.dot=$(top_srcdir)/%.png)
>
> 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 "=". Is it a typo?
Ah yes, definitely! I didn’t even notice when reading it above.
You’re welcome to make that change if nothing bad happens!
> Second, I noticed some rules like the following:
>
> .dot.eps:
> $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
> mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
Julien already replied; this is POSIX make notation.
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-06-16 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 0:48 Makefile logic to create Guix documentation Chris Marusich
2020-06-14 3:12 ` Julien Lepiller
2020-06-14 5:08 ` Chris Marusich
2020-06-16 9:40 ` Ludovic Courtès [this message]
2020-06-16 15:02 ` zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeqfwdp3.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=cmmarusich@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).