head 1.6; access; symbols netbsd-11-0-RC6:1.6 netbsd-11-0-RC5:1.6 netbsd-11-0-RC4:1.6 netbsd-11-0-RC3:1.6 netbsd-11-0-RC2:1.6 netbsd-11-0-RC1:1.6 perseant-exfatfs-base-20250801:1.6 netbsd-11:1.6.0.10 netbsd-11-base:1.6 netbsd-10-1-RELEASE:1.6 perseant-exfatfs-base-20240630:1.6 perseant-exfatfs:1.6.0.8 perseant-exfatfs-base:1.6 netbsd-10-0-RELEASE:1.6 netbsd-10-0-RC6:1.6 netbsd-10-0-RC5:1.6 netbsd-10-0-RC4:1.6 netbsd-10-0-RC3:1.6 netbsd-10-0-RC2:1.6 netbsd-10-0-RC1:1.6 netbsd-10:1.6.0.6 netbsd-10-base:1.6 cjep_sun2x-base1:1.6 cjep_sun2x:1.6.0.4 cjep_sun2x-base:1.6 cjep_staticlib_x-base1:1.6 cjep_staticlib_x:1.6.0.2 cjep_staticlib_x-base:1.6; locks; strict; comment @# @; 1.6 date 2020.11.22.21.34.34; author rillig; state Exp; branches; next 1.5; commitid TNGNop3LPihWFVwC; 1.5 date 2020.11.21.10.36.01; author rillig; state Exp; branches; next 1.4; commitid 8L4mZbeRrHUz3KwC; 1.4 date 2020.11.21.09.53.40; author rillig; state Exp; branches; next 1.3; commitid 0o7ilLBgfGMyPJwC; 1.3 date 2020.10.25.22.13.53; author rillig; state Exp; branches; next 1.2; commitid Tqq73q2hDrk0NktC; 1.2 date 2020.10.24.03.18.22; author rillig; state Exp; branches; next 1.1; commitid 2z2Y0KCB1iFBw6tC; 1.1 date 2020.10.24.02.25.02; author rillig; state Exp; branches; next ; commitid LsI7pCrnbN00f6tC; desc @@ 1.6 log @make(1): add more debugging for searching transformation rules @ text @Adding suffix ".c" Adding suffix ".cc" Adding suffix ".ccc" Adding suffix ".short" Adding suffix ".sho" Adding suffix ".dead-end" defining transformation from `.ccc' to `.cc' inserting ".ccc" (3) at end of list inserting ".cc" (2) at end of list transformation .ccc.cc complete defining transformation from `.c' to `.ccc' inserting ".c" (1) at end of list inserting ".ccc" (3) at end of list transformation .c.ccc complete defining transformation from `.short' to `.c' inserting ".short" (4) at end of list inserting ".c" (1) at end of list transformation .short.c complete defining transformation from `.sho' to `.c' inserting ".sho" (5) at end of list inserting ".c" (1) at end of list transformation .sho.c complete defining transformation from `.dead-end' to `.short' inserting ".dead-end" (6) at end of list inserting ".short" (4) at end of list transformation .dead-end.short complete Clearing all suffixes Adding suffix ".c" Adding suffix ".cc" Adding suffix ".ccc" inserting ".ccc" (3) at end of list inserting ".cc" (2) at end of list inserting ".c" (1) at end of list inserting ".ccc" (3) at end of list Adding suffix ".short" inserting ".short" (4) at end of list inserting ".c" (1) at end of list Adding suffix ".sho" inserting ".sho" (5) at end of list inserting ".c" (1) at end of list Adding suffix ".dead-end" inserting ".dead-end" (6) at end of list inserting ".short" (4) at end of list Wildcard expanding "all"... SuffFindDeps "all" No known suffix on all. Using .NULL suffix adding suffix rules Wildcard expanding "suff-lookup.cc"...suffix is ".cc"... SuffFindDeps "suff-lookup.cc" trying suff-lookup.ccc...not there trying suff-lookup.c...not there trying suff-lookup.short...not there trying suff-lookup.sho...got it applying .sho -> .c to "suff-lookup.c" applying .c -> .ccc to "suff-lookup.ccc" applying .ccc -> .cc to "suff-lookup.cc" suffix is ".ccc"... suffix is ".c"... suffix is ".sho"... SuffFindDeps "suff-lookup.sho" suffix is ".sho"... : 'Making suff-lookup.sho out of nothing.' : 'Making suff-lookup.c from suff-lookup.sho.' : 'Making suff-lookup.ccc from suff-lookup.c.' : 'Making suff-lookup.cc from suff-lookup.ccc.' Wildcard expanding "all"... SuffFindDeps ".END" No known suffix on .END. Using .NULL suffix adding suffix rules Wildcard expanding ".END"... exit status 0 @ 1.5 log @make(1): add more debug logging for suffixes The "Removing suffix" is not covered by the current tests. It would be best if that code were unreachable at all, since a reference count of -1 doesn't make sense. @ text @d45 1 a45 1 SuffFindDeps (all) d49 1 a49 1 SuffFindDeps (suff-lookup.cc) d60 1 a60 1 SuffFindDeps (suff-lookup.sho) d67 1 a67 1 SuffFindDeps (.END) @ 1.4 log @make(1): add debug logging when adding a suffix to the global list @ text @d27 1 @ 1.3 log @make(1): properly terminate debug output with newline Without this, NetBSD's sed adds the missing newline at the end of the file, while other sed implementations don't do that. @ text @d1 6 d27 3 d34 1 d37 1 d40 1 @ 1.2 log @make(1): extend test suff-lookup.mk This test ensures that FindSuffByName behaves correctly. In order to convert some char pointers to const char pointers, there needs to be FindSuffByNameLen, and to make sure that this function actually uses the given length, this test has the suffixes ".sho" and ".short". Without the proper string comparison in FindSuffByNameLen, the suffix ".short" might be found when searching for ".sho". @ text @d31 2 a32 1 Wildcard expanding "all"...SuffFindDeps (all) d35 2 a36 1 Wildcard expanding "suff-lookup.cc"...suffix is ".cc"...SuffFindDeps (suff-lookup.cc) d44 6 a49 2 suffix is ".ccc"...suffix is ".c"...suffix is ".sho"...SuffFindDeps (suff-lookup.sho) suffix is ".sho"...: 'Making suff-lookup.sho out of nothing.' d53 2 a54 1 Wildcard expanding "all"...SuffFindDeps (.END) @ 1.1 log @make(1): add test for looking up suffixes @ text @d17 14 d34 13 a46 13 Wildcard expanding "suff-main.cc"...suffix is ".cc"...SuffFindDeps (suff-main.cc) trying suff-main.ccc...not there trying suff-main.c...not there trying suff-main.short...not there trying suff-main.sho...got it applying .sho -> .c to "suff-main.c" applying .c -> .ccc to "suff-main.ccc" applying .ccc -> .cc to "suff-main.cc" suffix is ".ccc"...suffix is ".c"...suffix is ".sho"...SuffFindDeps (suff-main.sho) suffix is ".sho"...: 'Making suff-main.sho out of nothing.' : 'Making suff-main.c from suff-main.sho.' : 'Making suff-main.ccc from suff-main.c.' : 'Making suff-main.cc from suff-main.ccc.' @