head 1.8; access; symbols netbsd-11-0-RELEASE:1.8 netbsd-11-0-RC7:1.8 netbsd-11-0-RC6:1.8 netbsd-11-0-RC5:1.8 netbsd-11-0-RC4:1.8 netbsd-11-0-RC3:1.8 netbsd-11-0-RC2:1.8 netbsd-11-0-RC1:1.8 perseant-exfatfs-base-20250801:1.8 netbsd-11:1.8.0.2 netbsd-11-base:1.8 netbsd-10-1-RELEASE:1.6 perseant-exfatfs-base-20240630:1.7 perseant-exfatfs:1.7.0.2 perseant-exfatfs-base:1.7 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.2 netbsd-10-base:1.6 cjep_sun2x-base1:1.5 cjep_sun2x:1.5.0.4 cjep_sun2x-base:1.5 cjep_staticlib_x-base1:1.5 cjep_staticlib_x:1.5.0.2 cjep_staticlib_x-base:1.5; locks; strict; comment @# @; 1.8 date 2024.10.31.09.12.13; author rillig; state Exp; branches; next 1.7; commitid aM2UKIai5pq5gNvF; 1.7 date 2024.05.25.22.08.35; author rillig; state Exp; branches 1.7.2.1; next 1.6; commitid LOtUdBMhNPcLIqbF; 1.6 date 2021.12.28.15.49.00; author rillig; state Exp; branches; next 1.5; commitid WwIakaoa8jRuNqmD; 1.5 date 2021.04.04.10.13.09; author rillig; state Exp; branches; next 1.4; commitid LFRaK8edkdJ2DXNC; 1.4 date 2021.02.02.17.56.31; author rillig; state Exp; branches; next 1.3; commitid 3Fj2ADDTi69g8aGC; 1.3 date 2020.11.22.21.34.34; author rillig; state Exp; branches; next 1.2; commitid TNGNop3LPihWFVwC; 1.2 date 2020.11.21.10.36.01; author rillig; state Exp; branches; next 1.1; commitid 8L4mZbeRrHUz3KwC; 1.1 date 2020.11.21.10.32.42; author rillig; state Exp; branches; next ; commitid yVeFrB2g7apM2KwC; 1.7.2.1 date 2025.08.02.05.58.37; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.8 log @make: in the debug log, always qualify line number with filename Previously, to find out the filename corresponding to a line number from a 'Parsing' line, it was necessary to find the preceding 'SetFilenameVars' line, which was unnecessarily time-consuming and distracting. The 'filename:line' format matches the one used in PrintStackTrace, and it differs from the one used in PrintLocation, as the former format is more common in other tools. Most of the affected unit tests only use the 'Parsing' lines to give additional context to their debug log, so no structural changes there. @ text @Parsing suff-incomplete.mk:9: .SUFFIXES: ParseDependency(.SUFFIXES:) Clearing all suffixes Parsing suff-incomplete.mk:11: .SUFFIXES: .a .b .c ParseDependency(.SUFFIXES: .a .b .c) Adding suffix ".a" Adding suffix ".b" Adding suffix ".c" Parsing suff-incomplete.mk:17: .a.b: ParseDependency(.a.b:) defining transformation from `.a' to `.b' inserting ".a" (1) at end of list inserting ".b" (2) at end of list Parsing suff-incomplete.mk:21: .a.c: ${.PREFIX}.dependency deleting incomplete transformation from `.a' to `.b' ParseDependency(.a.c: ${.PREFIX}.dependency) defining transformation from `.a' to `.c' inserting ".a" (1) at end of list inserting ".c" (3) at end of list Target ".a.c" depends on "${.PREFIX}.dependency" # .a.c, unmade, type OP_DEPENDS|OP_TRANSFORM, flags none # ${.PREFIX}.dependency, unmade, type none, flags none Parsing suff-incomplete.mk:23: .DEFAULT: transformation .a.c complete ParseDependency(.DEFAULT:) Parsing suff-incomplete.mk:24: : Making ${.TARGET} from ${.IMPSRC} all ${.ALLSRC} by default. transformation .DEFAULT complete Wildcard expanding "all"... SuffFindDeps "all" No known suffix on all. Using .NULL suffix adding suffix rules Wildcard expanding "suff-incomplete.c"...suffix is ".c"... SuffFindDeps "suff-incomplete.c" trying suff-incomplete.a...not there Wildcard expanding "suff-incomplete.c"...suffix is ".c"... : Making suff-incomplete.c from suff-incomplete.c all by default. Wildcard expanding "all"... SuffFindDeps ".END" No known suffix on .END. Using .NULL suffix adding suffix rules Wildcard expanding ".END"... exit status 0 @ 1.7 log @make: use fewer technical terms in debug message for dependency @ text @d1 1 a1 1 Parsing line 9: .SUFFIXES: d4 1 a4 1 Parsing line 11: .SUFFIXES: .a .b .c d9 1 a9 1 Parsing line 17: .a.b: d14 1 a14 1 Parsing line 21: .a.c: ${.PREFIX}.dependency d23 1 a23 1 Parsing line 23: .DEFAULT: d26 1 a26 1 Parsing line 24: : Making ${.TARGET} from ${.IMPSRC} all ${.ALLSRC} by default. @ 1.7.2.1 log @Sync with HEAD @ text @d1 1 a1 1 Parsing suff-incomplete.mk:9: .SUFFIXES: d4 1 a4 1 Parsing suff-incomplete.mk:11: .SUFFIXES: .a .b .c d9 1 a9 1 Parsing suff-incomplete.mk:17: .a.b: d14 1 a14 1 Parsing suff-incomplete.mk:21: .a.c: ${.PREFIX}.dependency d23 1 a23 1 Parsing suff-incomplete.mk:23: .DEFAULT: d26 1 a26 1 Parsing suff-incomplete.mk:24: : Making ${.TARGET} from ${.IMPSRC} all ${.ALLSRC} by default. @ 1.6 log @make: make debug logging a bit more human-friendly The previous log format "ParseReadLine (%d): '%s'" focused on the implementation, it was not immediately obvious to a casual reader that the number in parentheses was the line number. Additionally, having both a colon and quotes in a log message is uncommon. The quotes have been added in parse.c 1.127 from 2007-01-01. The new log format "Parsing line %d: %s" is meant to be easier readable by humans. The quotes are not needed since ParseReadLine always strips trailing whitespace, leaving no room for ambiguities. The other log messages follow common punctuation rules, which makes the beginning of the line equally unambiguous. Before var.c 1.911 from 2021-04-05, variable assignments were logged with the format "%s:%s = %s", without a space after the colon. @ text @d20 1 a20 1 # LinkSource: added child .a.c - ${.PREFIX}.dependency @ 1.5 log @make: remove filler word 'Do' from function names for parsing No functional change, except for debug logging. @ text @d1 1 a1 1 ParseReadLine (9): '.SUFFIXES:' d4 1 a4 1 ParseReadLine (11): '.SUFFIXES: .a .b .c' d9 1 a9 1 ParseReadLine (17): '.a.b:' d14 1 a14 1 ParseReadLine (21): '.a.c: ${.PREFIX}.dependency' d23 1 a23 1 ParseReadLine (23): '.DEFAULT:' d26 1 a26 1 ParseReadLine (24): ' : Making ${.TARGET} from ${.IMPSRC} all ${.ALLSRC} by default.' @ 1.4 log @make: remove overengineered Enum_ValueToString For printing the status of a GNode, there was already made_name (now renamed to GNodeMade_Name), which prints user-friendly text instead of the bare enum constant names. To do this change confidently, I first had to demonstrate that the output really affects something other than just the word "UNMADE". There had not been a test for that case before, and the test immediately discovered a bug in the -dg2 and -dg3 options. This bug is one of the oldest in make, dating back to at least 1993. @ text @d2 1 a2 1 ParseDoDependency(.SUFFIXES:) d5 1 a5 1 ParseDoDependency(.SUFFIXES: .a .b .c) d10 1 a10 1 ParseDoDependency(.a.b:) d16 1 a16 1 ParseDoDependency(.a.c: ${.PREFIX}.dependency) d25 1 a25 1 ParseDoDependency(.DEFAULT:) @ 1.3 log @make(1): add more debugging for searching transformation rules @ text @d21 2 a22 2 # .a.c, made UNMADE, type OP_DEPENDS|OP_TRANSFORM, flags none # ${.PREFIX}.dependency, made UNMADE, type none, flags none @ 1.2 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 @d29 1 a29 1 SuffFindDeps (all) d33 1 a33 1 SuffFindDeps (suff-incomplete.c) d38 1 a38 1 SuffFindDeps (.END) @ 1.1 log @make(1): add test for incomplete transformation rule @ text @d3 1 @