head 1.6; access; symbols 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.2 netbsd-11-base:1.6 netbsd-10-1-RELEASE:1.5 perseant-exfatfs-base-20240630:1.5 perseant-exfatfs:1.5.0.4 perseant-exfatfs-base:1.5 netbsd-10-0-RELEASE:1.5 netbsd-10-0-RC6:1.5 netbsd-10-0-RC5:1.5 netbsd-10-0-RC4:1.5 netbsd-10-0-RC3:1.5 netbsd-10-0-RC2:1.5 netbsd-10-0-RC1:1.5 netbsd-10:1.5.0.2 netbsd-10-base:1.5 cjep_sun2x-base1:1.1 cjep_sun2x:1.1.0.4 cjep_sun2x-base:1.1 cjep_staticlib_x-base1:1.1 cjep_staticlib_x:1.1.0.2 cjep_staticlib_x-base:1.1; locks; strict; comment @# @; 1.6 date 2024.10.31.09.12.13; author rillig; state Exp; branches; next 1.5; commitid aM2UKIai5pq5gNvF; 1.5 date 2021.12.28.16.11.00; author rillig; state Exp; branches 1.5.4.1; next 1.4; commitid D6EHkdES6ou8ZqmD; 1.4 date 2021.12.28.15.49.00; author rillig; state Exp; branches; next 1.3; commitid WwIakaoa8jRuNqmD; 1.3 date 2021.12.13.23.38.54; author rillig; state Exp; branches; next 1.2; commitid 7rhw24srrR1oXxkD; 1.2 date 2021.06.17.15.25.33; author rillig; state Exp; branches; next 1.1; commitid BW1n1qoMwkrUYuXC; 1.1 date 2020.08.16.12.07.51; author rillig; state Exp; branches; next ; commitid coEgPk3hgfeYGhkC; 1.5.4.1 date 2025.08.02.05.58.33; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.6 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 deptgt-order.mk:15: .ORDER: three one ParseDependency(.ORDER: three one) # .ORDER forces 'three' to be made before 'one' # three, unmade, type OP_DEPENDS|OP_PHONY|OP_HAS_COMMANDS, flags none # one, unmade, type OP_DEPENDS|OP_PHONY, flags none Parsing deptgt-order.mk:16: .MAKEFLAGS: -d0 ParseDependency(.MAKEFLAGS: -d0) : 'Making two out of one.' : 'Making three out of two.' : 'Making all out of three.' exit status 0 @ 1.5 log @make: make debug logging for .ORDER more human-friendly The interesting part of the .ORDER constraint is what is made before what, so reveal this information in the debug log. The debug output from the test looks a bit strange since it forces 'three' to be made before 'one', but that's because the test exercises the edge case of introducing a circular dependency. @ text @d1 1 a1 1 Parsing line 15: .ORDER: three one d6 1 a6 1 Parsing line 16: .MAKEFLAGS: -d0 @ 1.5.4.1 log @Sync with HEAD @ text @d1 1 a1 1 Parsing deptgt-order.mk:15: .ORDER: three one d6 1 a6 1 Parsing deptgt-order.mk:16: .MAKEFLAGS: -d0 @ 1.4 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 @d3 1 a3 1 # ParseDependencySourceOrder: added Order dependency three - one @ 1.3 log @tests/make: extend tests for parsing makefiles @ text @d1 1 a1 1 ParseReadLine (15): '.ORDER: three one' d6 1 a6 1 ParseReadLine (16): '.MAKEFLAGS: -d0' @ 1.2 log @tests/make: add test for circular dependency in .ORDER @ text @d1 7 @ 1.1 log @make(1): add dummies for fine-grained tests, one per single feature The test names have been derived from the current manual page. All these tests are dummies right now, and the code from the existing tests will be moved into the new tests step by step. This is done to prevent modmisc, escape, varmod-edge and varmisc from growing without any bounds, and to reduce the side-effects of one test to the others. @ text @d1 3 @