lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripts/build/scan-mf-deps: script to generate MF dependencies (issu


From: hanwenn
Subject: Re: scripts/build/scan-mf-deps: script to generate MF dependencies (issue 553700043 by address@hidden)
Date: Tue, 17 Mar 2020 02:13:02 -0700

https://codereview.appspot.com/553700043/diff/567370043/mf/GNUmakefile
File mf/GNUmakefile (right):

https://codereview.appspot.com/553700043/diff/567370043/mf/GNUmakefile#newcode36
mf/GNUmakefile:36: $(src-dir)/invoke-mf2pt.sh $(buildscript-dir)/mf2pt1
$< $@ $(METAFONT_QUIET)
On 2020/03/17 07:41:25, hahnjo wrote:
> Should this script be called invoke-mf2pt1.sh? The package is also
called mf2pt1

Done.

https://codereview.appspot.com/553700043/diff/567370043/mf/GNUmakefile#newcode39
mf/GNUmakefile:39: $(UPDATE_TARGET)
On 2020/03/17 07:41:25, hahnjo wrote:
> Can we list .tfm and .log files directly as output of above rule that
produces
> .pfb? As far as I understand, mf2pt1 produces all three of them,
right?

this is tempting, but

  t1 t2 : src
      recipe

is short for

  t1 : src
     recipe

  t2 : src
      recipe

this means that the value of $@ depends on which thing gets built first.
There is also a related &: operator, but it also doesn't work for the
same reason.

https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py
File mf/scan-mf-deps.py (right):

https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py#newcode1
mf/scan-mf-deps.py:1: #!/usr/bin/python
On 2020/03/17 07:41:25, hahnjo wrote:
> This should be #!@PYTHON@ so that setting PYTHON in configure is taken
into
> account.

Acknowledged.

https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py#newcode10
mf/scan-mf-deps.py:10: re.sub("\\(%s/?([^\n )]*\\.mf)" % srcdir, lambda
m: deps.append(m.group(1)), input)
On 2020/03/17 07:41:25, hahnjo wrote:
> Now that should be very possible with sed in .sh plus you already have
all the
> information available and don't need to parse it from sys.argv

Acknowledged.

https://codereview.appspot.com/553700043/diff/567370043/mf/scan-mf-deps.py#newcode12
mf/scan-mf-deps.py:12: target = target.replace(srcdir, "").lstrip("/")
On 2020/03/17 08:08:37, hahnjo wrote:
> This doesn't work for out-of-tree builds where srcdir != builddir.
target is
> naturally below builddir and srcdir is not found, so it only lstrip's
/ which
> leads to an absolute path without the leading slash.

I have a brilliant alternative. See next patchset.

https://codereview.appspot.com/553700043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]