Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(221)

Issue 553700043: scripts/build/scan-mf-deps: script to generate MF dependencies

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 weeks, 5 days ago by hanwenn
Modified:
2 weeks, 5 days ago
Reviewers:
wl, hahnjo, c_sorensen, lemzwerg, hahnjo, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

mf/GNUmakefile: move logic to scripts This is a small enabling step for moving to a different build system * Metafont dependency scanning uses advanced GNU Make scripting. Use a python script instead * The mf2pt invocation is intricate. Use a shell script instead * Take the .log and .tfm files from the MetaPost run. (We were compiling all fonts twice.) * Remove some unused variables and rules

Patch Set 1 #

Patch Set 2 : more cleanup #

Total comments: 1

Patch Set 3 : /bin/dash #

Total comments: 1

Patch Set 4 : analyze log file #

Patch Set 5 : realpath #

Patch Set 6 : realpath 2 #

Patch Set 7 : /bin/sh #

Total comments: 6

Patch Set 8 : oops - restored overly zealous deletions #

Patch Set 9 : local-clean #

Total comments: 12

Patch Set 10 : -recorder #

Total comments: 4

Patch Set 11 : rename. #

Patch Set 12 : rename (2nd try) #

Total comments: 4

Patch Set 13 : touch multiple files #

Total comments: 1

Patch Set 14 : jonas' suggestion #

Total comments: 16

Patch Set 15 : Final comments. #

Patch Set 16 : oops #

Total comments: 2

Patch Set 17 : Jonas' nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -141 lines) Patch
M mf/GNUmakefile View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +40 lines, -139 lines 0 comments Download
A mf/invoke-mf2pt1.sh View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +36 lines, -0 lines 0 comments Download
M mf/parmesan-other-generic.mf View 1 chunk +1 line, -1 line 0 comments Download
M scripts/build/mf2pt1.pl View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 62
hanwenn
more cleanup
3 weeks, 5 days ago (2020-03-14 19:54:35 UTC) #1
lemzwerg
this looks like a good idea, thanks! https://codereview.appspot.com/553700043/diff/547740044/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/547740044/mf/invoke-mf2pt.sh#newcode4 mf/invoke-mf2pt.sh:4: mf2pt1=$(realpath $1) ...
3 weeks, 5 days ago (2020-03-14 20:26:45 UTC) #2
hanwenn
/bin/dash
3 weeks, 5 days ago (2020-03-14 23:30:46 UTC) #3
dak
Why would we want to move away from GNU make as a build system?
3 weeks, 5 days ago (2020-03-14 23:46:17 UTC) #4
hanwenn
On 2020/03/14 23:46:17, dak wrote: > Why would we want to move away from GNU ...
3 weeks, 5 days ago (2020-03-14 23:57:48 UTC) #5
lemzwerg
https://codereview.appspot.com/553700043/diff/545710043/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/545710043/mf/invoke-mf2pt.sh#newcode4 mf/invoke-mf2pt.sh:4: mf2pt1=$(realpath $1) Second try. According to https://unix.stackexchange.com/questions/136494/whats-the-difference-between-realpath-and-readlink-f https://unix.stackexchange.com/questions/101080/realpath-command-not-found it ...
3 weeks, 4 days ago (2020-03-15 05:40:50 UTC) #6
hahnjo
On 2020/03/14 23:57:48, hanwenn wrote: > I have been experimenting with Ninja (https://ninja-build.org/), but Ninja ...
3 weeks, 4 days ago (2020-03-15 11:05:15 UTC) #7
hanwenn
On Sun, Mar 15, 2020 at 12:05 PM <jonas.hahnfeld@gmail.com> wrote: > > On 2020/03/14 23:57:48, ...
3 weeks, 4 days ago (2020-03-15 14:39:06 UTC) #8
c_sorensen
On 3/15/20, 8:39 AM, "lilypond-devel on behalf of Han-Wen Nienhuys" <lilypond-devel-bounces+c_sorensen=byu.edu@gnu.org on behalf of hanwenn@gmail.com> ...
3 weeks, 4 days ago (2020-03-15 15:02:57 UTC) #9
wl_gnu.org
>> What's the motivation to use Python for all of this? > > What's the ...
3 weeks, 4 days ago (2020-03-15 15:10:05 UTC) #10
dak
Werner LEMBERG <wl@gnu.org> writes: >>> What's the motivation to use Python for all of this? ...
3 weeks, 4 days ago (2020-03-15 16:03:49 UTC) #11
hahnjo
On 2020/03/15 14:39:06, hanwenn wrote: > On Sun, Mar 15, 2020 at 12:05 PM <mailto:jonas.hahnfeld@gmail.com> ...
3 weeks, 4 days ago (2020-03-15 16:04:48 UTC) #12
dak
Carl Sorensen <c_sorensen@byu.edu> writes: > On 3/15/20, 8:39 AM, "lilypond-devel on behalf of Han-Wen Nienhuys" ...
3 weeks, 4 days ago (2020-03-15 16:09:22 UTC) #13
hanwenn
On Sun, Mar 15, 2020 at 5:04 PM <jonas.hahnfeld@gmail.com> wrote: > > On 2020/03/15 14:39:06, ...
3 weeks, 4 days ago (2020-03-15 16:16:06 UTC) #14
hanwenn
On Sun, Mar 15, 2020 at 5:03 PM David Kastrup <dak@gnu.org> wrote: > Makefiles are ...
3 weeks, 4 days ago (2020-03-15 18:11:44 UTC) #15
hahnjo
On 2020/03/15 16:16:06, hanwenn wrote: > On Sun, Mar 15, 2020 at 5:04 PM <mailto:jonas.hahnfeld@gmail.com> ...
3 weeks, 4 days ago (2020-03-15 18:14:03 UTC) #16
hahnjo
On 2020/03/15 18:11:44, hanwenn wrote: > On Sun, Mar 15, 2020 at 5:03 PM David ...
3 weeks, 4 days ago (2020-03-15 18:16:02 UTC) #17
hanwenn
On Sun, Mar 15, 2020 at 7:14 PM <jonas.hahnfeld@gmail.com> wrote: > > On Sun, Mar ...
3 weeks, 4 days ago (2020-03-15 18:52:27 UTC) #18
hanwenn
On Sun, Mar 15, 2020 at 7:14 PM <jonas.hahnfeld@gmail.com> wrote: > > I very much ...
3 weeks, 4 days ago (2020-03-15 18:54:44 UTC) #19
dak
Han-Wen Nienhuys <hanwenn@gmail.com> writes: > On Sun, Mar 15, 2020 at 5:03 PM David Kastrup ...
3 weeks, 4 days ago (2020-03-15 19:32:14 UTC) #20
hahnjo
On 2020/03/15 18:52:27, hanwenn wrote: > > Not doing this at all. > > In ...
3 weeks, 4 days ago (2020-03-15 19:44:34 UTC) #21
hanwenn
analyze log file
3 weeks, 4 days ago (2020-03-15 21:35:43 UTC) #22
hanwenn
On Sun, Mar 15, 2020 at 8:44 PM <jonas.hahnfeld@gmail.com> wrote: > On 2020/03/15 18:54:44, hanwenn ...
3 weeks, 4 days ago (2020-03-15 21:46:38 UTC) #23
hanwenn
On Sun, Mar 15, 2020 at 8:32 PM David Kastrup <dak@gnu.org> wrote: > > I ...
3 weeks, 4 days ago (2020-03-15 21:49:38 UTC) #24
hanwenn
realpath
3 weeks, 4 days ago (2020-03-15 21:53:10 UTC) #25
hanwenn
realpath 2
3 weeks, 4 days ago (2020-03-15 21:59:45 UTC) #26
hanwenn
/bin/sh
3 weeks, 4 days ago (2020-03-15 22:00:26 UTC) #27
hanwenn
On 2020/03/14 20:26:45, lemzwerg wrote: > this looks like a good idea, thanks! > > ...
3 weeks, 4 days ago (2020-03-15 22:01:08 UTC) #28
lemzwerg
LGTM https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh#newcode18 mf/invoke-mf2pt.sh:18: # which no longer dump a .mem file ...
3 weeks, 3 days ago (2020-03-16 06:16:22 UTC) #29
hahnjo
On 2020/03/15 21:46:38, hanwenn wrote: > On Sun, Mar 15, 2020 at 8:44 PM <mailto:jonas.hahnfeld@gmail.com> ...
3 weeks, 3 days ago (2020-03-16 07:29:06 UTC) #30
hanwenn
On Mon, Mar 16, 2020 at 8:29 AM <jonas.hahnfeld@gmail.com> wrote: > > On 2020/03/15 21:46:38, ...
3 weeks, 3 days ago (2020-03-16 07:51:35 UTC) #31
dak
Han-Wen Nienhuys <hanwenn@gmail.com> writes: > I am not asking you for a review of a ...
3 weeks, 3 days ago (2020-03-16 19:15:55 UTC) #32
hanwenn
oops - restored overly zealous deletions
3 weeks, 3 days ago (2020-03-16 21:52:41 UTC) #33
hanwenn
local-clean
3 weeks, 3 days ago (2020-03-16 22:19:05 UTC) #34
hanwenn
https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh#newcode18 mf/invoke-mf2pt.sh:18: # which no longer dump a .mem file On ...
3 weeks, 3 days ago (2020-03-16 22:53:57 UTC) #35
lemzwerg
https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/555460043/mf/invoke-mf2pt.sh#newcode18 mf/invoke-mf2pt.sh:18: # which no longer dump a .mem file > ...
3 weeks, 2 days ago (2020-03-17 06:08:06 UTC) #36
hahnjo
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) Should this script be ...
3 weeks, 2 days ago (2020-03-17 07:41:26 UTC) #37
dak
https://codereview.appspot.com/553700043/diff/567370043/mf/invoke-mf2pt.sh File mf/invoke-mf2pt.sh (right): https://codereview.appspot.com/553700043/diff/567370043/mf/invoke-mf2pt.sh#newcode4 mf/invoke-mf2pt.sh:4: realpath() { On 2020/03/17 07:41:25, hahnjo wrote: > AFAIK ...
3 weeks, 2 days ago (2020-03-17 07:54:13 UTC) #38
hahnjo
On 2020/03/17 07:54:13, dak wrote: > https://codereview.appspot.com/553700043/diff/567370043/mf/invoke-mf2pt.sh > File mf/invoke-mf2pt.sh (right): > > https://codereview.appspot.com/553700043/diff/567370043/mf/invoke-mf2pt.sh#newcode4 > ...
3 weeks, 2 days ago (2020-03-17 08:01:30 UTC) #39
hahnjo
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#newcode12 mf/scan-mf-deps.py:12: target = target.replace(srcdir, "").lstrip("/") This doesn't work for out-of-tree ...
3 weeks, 2 days ago (2020-03-17 08:08:37 UTC) #40
hanwenn
-recorder
3 weeks, 2 days ago (2020-03-17 09:12:10 UTC) #41
hanwenn
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 ...
3 weeks, 2 days ago (2020-03-17 09:13:02 UTC) #42
hahnjo
On 2020/03/17 07:41:26, hahnjo wrote: > 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: ...
3 weeks, 2 days ago (2020-03-17 09:22:23 UTC) #43
hahnjo
https://codereview.appspot.com/553700043/diff/547760043/mf/GNUmakefile File mf/GNUmakefile (right): https://codereview.appspot.com/553700043/diff/547760043/mf/GNUmakefile#newcode37 mf/GNUmakefile:37: $(src-dir)/invoke-mf2pt.sh $(buildscript-dir)/mf2pt1 $< $@ $(METAFONT_QUIET) Needs updating! https://codereview.appspot.com/553700043/diff/547760043/mf/invoke-mf2pt1.sh File ...
3 weeks, 2 days ago (2020-03-17 09:29:28 UTC) #44
hanwenn
rename.
3 weeks, 2 days ago (2020-03-17 19:00:25 UTC) #45
hanwenn
rename (2nd try)
3 weeks, 2 days ago (2020-03-17 19:08:25 UTC) #46
hanwenn
https://codereview.appspot.com/553700043/diff/547760043/mf/GNUmakefile File mf/GNUmakefile (right): https://codereview.appspot.com/553700043/diff/547760043/mf/GNUmakefile#newcode37 mf/GNUmakefile:37: $(src-dir)/invoke-mf2pt.sh $(buildscript-dir)/mf2pt1 $< $@ $(METAFONT_QUIET) On 2020/03/17 09:29:28, hahnjo ...
3 weeks, 2 days ago (2020-03-17 20:10:51 UTC) #47
hahnjo
https://codereview.appspot.com/553700043/diff/547770043/mf/GNUmakefile File mf/GNUmakefile (right): https://codereview.appspot.com/553700043/diff/547770043/mf/GNUmakefile#newcode40 mf/GNUmakefile:40: $(UPDATE_TARGET) I see spurious rebuilds if I re-run make ...
3 weeks, 2 days ago (2020-03-17 20:40:44 UTC) #48
hahnjo
On 2020/03/17 20:10:51, hanwenn wrote: > https://codereview.appspot.com/553700043/diff/547760043/mf/invoke-mf2pt1.sh > File mf/invoke-mf2pt1.sh (right): > > https://codereview.appspot.com/553700043/diff/547760043/mf/invoke-mf2pt1.sh#newcode35 > ...
3 weeks, 2 days ago (2020-03-17 20:47:22 UTC) #49
hanwenn
On 2020/03/17 20:47:22, hahnjo wrote: > On 2020/03/17 20:10:51, hanwenn wrote: > > https://codereview.appspot.com/553700043/diff/547760043/mf/invoke-mf2pt1.sh > ...
3 weeks, 2 days ago (2020-03-17 21:18:50 UTC) #50
hanwenn
touch multiple files
3 weeks, 2 days ago (2020-03-17 21:25:29 UTC) #51
hahnjo
On 2020/03/17 21:18:50, hanwenn wrote: > On 2020/03/17 20:47:22, hahnjo wrote: > > On 2020/03/17 ...
3 weeks, 2 days ago (2020-03-17 21:31:02 UTC) #52
hahnjo
The latest version fails for me, see my inline comment. The following still works and ...
3 weeks, 1 day ago (2020-03-18 13:27:51 UTC) #53
hahnjo_hahnjo.de
Am Mittwoch, den 18.03.2020, 06:27 -0700 schrieb jonas.hahnfeld@gmail.com: > The latest version fails for me, ...
3 weeks, 1 day ago (2020-03-18 13:30:49 UTC) #54
hanwenn
jonas' suggestion
3 weeks, 1 day ago (2020-03-18 23:08:31 UTC) #55
hanwenn
On Tue, Mar 17, 2020 at 10:31 PM <jonas.hahnfeld@gmail.com> wrote: > works for me with ...
3 weeks, 1 day ago (2020-03-18 23:10:37 UTC) #56
hahnjo
The latest version builds, but still has many things wrong that I've mentioned before plus ...
3 weeks ago (2020-03-19 08:29:59 UTC) #57
hanwenn
Final comments.
2 weeks, 6 days ago (2020-03-20 11:59:43 UTC) #58
hanwenn
oops
2 weeks, 6 days ago (2020-03-20 12:02:15 UTC) #59
hahnjo
The changes largely LGTM and I've verified that it finally works on my system. https://codereview.appspot.com/553700043/diff/577680043/mf/invoke-mf2pt1.sh ...
2 weeks, 6 days ago (2020-03-20 13:01:57 UTC) #60
hanwenn
Jonas' nits
2 weeks, 6 days ago (2020-03-20 17:16:56 UTC) #61
hanwenn
2 weeks, 5 days ago (2020-03-21 12:28:59 UTC) #62
https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile
File mf/GNUmakefile (right):

https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile#newcode36
mf/GNUmakefile:36: $(call ly_progress,Making,$@,< mf)
On 2020/03/19 08:29:59, hahnjo wrote:
> Should be $(outdir)/%.pfb instead of $@

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile#newcode63
mf/GNUmakefile:63: EXTRA_DIST_FILES += README mf2pt1.mp invoke-mf2pt.sh r
On 2020/03/19 08:29:59, hahnjo wrote:
> Extraneous 'r' at the end

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile#newcod...
mf/GNUmakefile:124: $(call ly_progress,Making,$@,< log)
On 2020/03/19 08:29:59, hahnjo wrote:
> Should (probably) be $(outdir)/%.lisp instead of $@

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile#newcod...
mf/GNUmakefile:141: $(call ly_progress,Making,$@,)
On 2020/03/19 08:29:59, hahnjo wrote:
> $(outdir)/emmentaler-$*.otf

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/GNUmakefile#newcod...
mf/GNUmakefile:149: $(call ly_progress,Making,$@,)
On 2020/03/19 08:29:59, hahnjo wrote:
> $(outdir)/emmentaler-brace.otf

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/invoke-mf2pt1.sh
File mf/invoke-mf2pt1.sh (right):

https://codereview.appspot.com/553700043/diff/545720043/mf/invoke-mf2pt1.sh#n...
mf/invoke-mf2pt1.sh:24: ln -s ../../mf2pt1.mp .
On 2020/03/19 08:29:59, hahnjo wrote:
> This link is not correct for out-of-tree builds. However MetaPost still finds
> mf2pt1.mp correctly in $srcdir because MFINPUTS is set below. I think all of
> this linking can be removed.

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/invoke-mf2pt1.sh#n...
mf/invoke-mf2pt1.sh:34: echo -n "$target : " > ${name}.dep
On 2020/03/19 08:29:59, hahnjo wrote:
> As I said before this doesn't work because $target is an absolute path. My
> suggestion is to assign target=$3 and introduce target_path=$(realpath
$target)

Done.

https://codereview.appspot.com/553700043/diff/545720043/mf/invoke-mf2pt1.sh#n...
mf/invoke-mf2pt1.sh:38: touch *.pfb *.tfm *.log *.dep
On 2020/03/19 08:29:59, hahnjo wrote:
> Should not be needed anymore

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b