-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
In this build file, copy
depends on other
, but when other
changes, copy
is not rebuilt:
rule dyndep
command = printf 'ninja_dyndep_version = 1\nbuild stamp | other: dyndep\n' > $out
rule build_with_dyndep
command = touch $out other
dyndep = $out.dd
rule depends_on_dyndep
command = printf '%s: other\n' $out > $out.d && cp other $out
depfile = $out.d
build stamp.dd: dyndep
build stamp: build_with_dyndep || stamp.dd
build copy: depends_on_dyndep || stamp
$ ninja --version
1.12.1
$ ninja -v
[1/3] printf 'ninja_dyndep_version = 1\nbuild stamp | other: dyndep\n' > stamp.dd
[2/3] touch stamp other
[3/3] printf '%s: other\n' copy > copy.d && cp other copy
$ # edit build.ninja to add some spaces to build_with_dyndep's command
$ ninja -v
[1/1] touch stamp other
$ ninja -v
[1/1] printf '%s: other\n' copy > copy.d && cp other copy
$ ninja -v
ninja: no work to do.
$ ninja -t missingdeps
Processed 3 nodes.
No missing dependencies on generated files found.
Metadata
Metadata
Assignees
Labels
No labels