NetBSD/usr.bin/make/unit-tests/suff-main-several.exp

144 lines
4.3 KiB
Plaintext
Raw Normal View History

ParseReadLine (8): '.1.2 .1.3 .1.4:'
ParseDependency(.1.2 .1.3 .1.4:)
Setting main node to ".1.2"
ParseReadLine (9): ' : Making ${.TARGET} from ${.IMPSRC}.'
ParseReadLine (14): 'next-main:'
ParseDependency(next-main:)
ParseReadLine (15): ' : Making ${.TARGET}'
ParseReadLine (19): '.SUFFIXES: .1 .2 .3 .4'
ParseDependency(.SUFFIXES: .1 .2 .3 .4)
Adding suffix ".1"
Adding suffix ".2"
Setting main node from ".1.2" back to null
defining transformation from `.1' to `.2'
inserting ".1" (1) at end of list
inserting ".2" (2) at end of list
Setting main node to ".1.3"
Adding suffix ".3"
Setting main node from ".1.3" back to null
defining transformation from `.1' to `.3'
inserting ".1" (1) at end of list
inserting ".3" (3) at end of list
Setting main node to ".1.4"
Adding suffix ".4"
Setting main node from ".1.4" back to null
defining transformation from `.1' to `.4'
inserting ".1" (1) at end of list
inserting ".4" (4) at end of list
Setting main node to "next-main"
ParseReadLine (24): '.SUFFIXES:'
ParseDependency(.SUFFIXES:)
Clearing all suffixes
ParseReadLine (32): '.SUFFIXES: .4 .3 .2 .1'
ParseDependency(.SUFFIXES: .4 .3 .2 .1)
Adding suffix ".4"
Adding suffix ".3"
Adding suffix ".2"
Adding suffix ".1"
ParseReadLine (33): '.SUFFIXES:'
ParseDependency(.SUFFIXES:)
Clearing all suffixes
ParseReadLine (34): '.SUFFIXES: .1 .2 .3 .4'
ParseDependency(.SUFFIXES: .1 .2 .3 .4)
Adding suffix ".1"
Adding suffix ".2"
Adding suffix ".3"
Adding suffix ".4"
ParseReadLine (35): '.SUFFIXES:'
ParseDependency(.SUFFIXES:)
Clearing all suffixes
ParseReadLine (36): '.SUFFIXES: .4 .3 .2 .1'
ParseDependency(.SUFFIXES: .4 .3 .2 .1)
Adding suffix ".4"
Adding suffix ".3"
Adding suffix ".2"
Adding suffix ".1"
ParseReadLine (38): 'suff-main-several.1:'
ParseDependency(suff-main-several.1:)
ParseReadLine (39): ' : Making ${.TARGET} out of nothing.'
ParseReadLine (40): 'next-main: suff-main-several.{2,3,4}'
ParseDependency(next-main: suff-main-several.{2,3,4})
# LinkSource: added child next-main - suff-main-several.{2,3,4}
# next-main, unmade, type OP_DEPENDS|OP_HAS_COMMANDS, flags none
# suff-main-several.{2,3,4}, unmade, type none, flags none
ParseReadLine (42): '.MAKEFLAGS: -d0 -dg1'
ParseDependency(.MAKEFLAGS: -d0 -dg1)
#*** Input graph:
# .1.2, unmade, type OP_TRANSFORM, flags none
# .1.3, unmade, type OP_TRANSFORM, flags none
# .1.4, unmade, type OP_TRANSFORM, flags none
# next-main, unmade, type OP_DEPENDS|OP_HAS_COMMANDS, flags none
# suff-main-several.1, unmade, type OP_DEPENDS|OP_HAS_COMMANDS, flags none
# suff-main-several.{2,3,4}, unmade, type none, flags none
#
# Files that are only sources:
# .1.2 [.1.2]
# .1.3 [.1.3]
# .1.4 [.1.4]
# suff-main-several.{2,3,4} [suff-main-several.{2,3,4}]
#*** Global Variables:
.ALLTARGETS = .1.2 .1.3 .1.4 next-main suff-main-several.1 suff-main-several.{2,3,4}
.CURDIR = <curdir>
.INCLUDES =
.LIBS =
.MAKE = <details omitted>
.MAKE.DEPENDFILE = <details omitted>
2020-11-25 03:50:44 +03:00
.MAKE.GID = <details omitted>
.MAKE.LEVEL = <details omitted>
.MAKE.MAKEFILES = <details omitted>
.MAKE.MAKEFILE_PREFERENCE = <details omitted>
.MAKE.OS = <details omitted>
.MAKE.PATH_FILEMON = <details omitted>
.MAKE.PID = <details omitted>
.MAKE.PPID = <details omitted>
2020-11-25 03:50:44 +03:00
.MAKE.UID = <details omitted>
.MAKEFLAGS = -r -k -d mps -d 0 -d g1
.MAKEOVERRIDES =
.OBJDIR = <curdir>
.PATH = . <curdir>
.TARGETS =
.newline =
MACHINE = <details omitted>
MACHINE_ARCH = <details omitted>
MAKE = <details omitted>
MFLAGS = -r -k -d mps -d 0 -d g1
#*** Command-line Variables:
.MAKE.LEVEL.ENV = MAKELEVEL
#*** Directory Cache:
# Stats: 0 hits 2 misses 0 near misses 0 losers (0%)
# refs hits directory
# 1 0 <curdir>
# 1 0 .
# 1 0 <defsyspath>
#*** Suffixes:
# ".4" (num 1, ref 1)
# To:
# From:
# Search Path:
# ".3" (num 2, ref 1)
# To:
# From:
# Search Path:
# ".2" (num 3, ref 1)
# To:
# From:
# Search Path:
# ".1" (num 4, ref 1)
# To:
# From:
# Search Path:
#*** Transformations:
make: don't know how to make suff-main-several.2 (continuing)
make: don't know how to make suff-main-several.3 (continuing)
make: don't know how to make suff-main-several.4 (continuing)
`next-main' not remade because of errors.
make(1): fix exit status in -k mode if a dependency fails Whether in -k mode or not, the exit status tells whether all requested targets were made or not. If a dependency could not be made, the main target was not made as well, therefore the exit status must be nonzero in such a case. This part of the code lacked proper unit tests until today. The unit test deptgt-end-fail.mk is compatible with make>=2003 at least, allowing to compare the output over time. In 2003, in the ok-ok-ok-ok case, "Making all from all-dep." was printed twice in a row, for whatever reason ... (40 minutes later) ... If I had just made the two commands for 'all' and '.END' more distinguishable. Back in 2003, the local variables for .END had not been initialized, instead the .END node was run with the local variables of the last preceding node. In this case, that node was 'all', therefore ${.TARGET} had obviously expanded to 'all'. Somewhere in 2004, the shell commands were no longer run with the -e flag, which resulted in the "exit status $?" line to be printed in cases that had stopped early before. Somewhere in 2005, the local variables for the .END node had been fixed. The variable ${.TARGET} now had the value '.END', just as expected. In addition, the dependencies for the .END node were made, although without getting their proper local variables. This resulted in the output "Making out of nothing" instead of the expected "Making end-dep out of nothing". Still in 2005, in the test case "all=ok all-dep=ok end=ok end-dep=ERR", the error code of the failed 'end-dep' was first reported as "*** Error code 1 (continuing)". To compensate for this improvement, a new bug had been introduced. The test case "all=ok all-dep=ok end=ERR end-dep=ERR" had properly exited with status 1 on 2005-01-01, but on 2006-01-01 it exited with status 0, thereby ignoring errors in the .END node. Somewhere in 2008, some of the error messages (but not all) were directed to stderr instead of stdout. The actual output stayed the same though. Somewhere in 2011, the dependency of the .END node got its own local variables, and ${.TARGET} now expanded to 'end-dep', as expected. Somewhere in 2016, the two empty lines between the "*** Error code 1 (continuing)" and the "Stop." got compressed into a single empty line. On 2020-12-07 (that is, today), the exit status 1 has been restored in the error cases, after it had been wrong for at least 14 years.
2020-12-07 03:53:30 +03:00
Stop.
make: stopped in unit-tests
exit status 1