CVS log for src/usr.bin/make/unit-tests/hanoi-include.mk
Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Oct 19 18:24:33 2023 UTC (12 months, 2 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
HEAD
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -3
lines
tests/make: clean up, explain and reorganize several tests
Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jan 19 22:48:42 2023 UTC (21 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +12 -6
lines
tests/make: remove dependency on expr(1) from a test
This saves 124 calls to the shell.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun May 8 07:27:50 2022 UTC (2 years, 6 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +13 -12
lines
tests/make: add test for option '-X', clean up comments
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jan 8 22:13:43 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3
lines
tests/make: test line numbers in debug output for parsing files
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Oct 3 17:30:54 2020 UTC (4 years, 1 month ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
make(1): add test demonstrating the Towers of Hanoi puzzle
It's not the primary task of make to handle procedure calls with
parameters, combined with lexical scoping, therefore the code does not
look as straight-forward or clean as in other programming languages. It
feels more like squeezing a programming problem from the imperative
world into the world of declarative dependencies.
A more idiomatic way of implementing this puzzle should be as a
dependency graph since that's both the natural structure of the puzzle
and the primary domain of make. Something like having a main target
"hanoi-5" that depends on intermediate targets of the form
"move-1.2.3.4.5-_._._._._-_._._._._", each representing a single
configuration of the stacks. These targets could be generated
dynamically. A benefit of this implementation would be that the puzzle
could be resumed from an arbitrary configuration, just just from the
initial configuration.
CVSweb <webmaster@jp.NetBSD.org>