diff options
author | Paul Smith <psmith@gnu.org> | 2013-09-12 04:07:52 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-09-12 04:07:52 -0400 |
commit | deff9dacc97cc20015d3018992f2c77cb7fab102 (patch) | |
tree | 3da393310f9936a22aa211e6870a23e98b6fdebe /tests/scripts/features/output-sync | |
parent | 40a49f244da5b417af8bede84ac221cee2318d88 (diff) | |
download | gunmake-deff9dacc97cc20015d3018992f2c77cb7fab102.tar.gz |
Enhance the output sync mode.
Create a new file, output.c, and collect functions that generate output there.
We introduce a new global context specifying where output should go (to stdout
or to a sync file), and the lowest level output generator chooses where to
write output based on that context.
This allows us to set the context globally, and all operations that write
output (including functions like $(info ...) etc.) will use it.
Removed the "--trace=dir" capability. It was too confusing. If you have
directory tracking enabled then output sync will print the enter/leave message
for each synchronized block. If you don't want that, disable directory
tracking.
Diffstat (limited to 'tests/scripts/features/output-sync')
-rw-r--r-- | tests/scripts/features/output-sync | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/scripts/features/output-sync b/tests/scripts/features/output-sync index b4541fb..55af0a1 100644 --- a/tests/scripts/features/output-sync +++ b/tests/scripts/features/output-sync @@ -135,6 +135,8 @@ foo: end #MAKE#[1]: Entering directory '#PWD#/bar' bar: start bar: end +#MAKE#[1]: Leaving directory '#PWD#/bar' +#MAKE#[1]: Entering directory '#PWD#/bar' baz: start baz: end #MAKE#[1]: Leaving directory '#PWD#/bar'\n", 0, 6); @@ -146,6 +148,9 @@ baz: end unlink(@syncfiles); run_make_test(qq! +x=1 +\$xMAKEFLAGS += --no-print-directory + all: make-foo make-bar make-foo: ; \$(MAKE) -C foo @@ -157,14 +162,28 @@ $sleep_command 1 ; #MAKEPATH# -C bar #MAKE#[1]: Entering directory '#PWD#/bar' bar: start bar: end +#MAKE#[1]: Leaving directory '#PWD#/bar' #MAKE#[1]: Entering directory '#PWD#/foo' foo: start foo: end #MAKE#[1]: Leaving directory '#PWD#/foo' +#MAKE#[1]: Entering directory '#PWD#/bar' baz: start baz: end #MAKE#[1]: Leaving directory '#PWD#/bar'\n", 0, 6); +# Rerun but this time suppress the directory tracking +unlink(@syncfiles); +run_make_test(undef, '-j --output-sync=target x=', + "#MAKEPATH# -C foo +$sleep_command 1 ; #MAKEPATH# -C bar +bar: start +bar: end +foo: start +foo: end +baz: start +baz: end\n", 0, 6); + # Test that messages from make itself are enclosed with # "Entering/Leaving directory" messages. unlink(@syncfiles); @@ -209,10 +228,14 @@ make-bar: ; $sleep_command 1 ; \$(MAKE) -C bar bar-job!, $sleep_command 1 ; #MAKEPATH# -C bar bar-job #MAKE#[1]: Entering directory '#PWD#/foo' foo: start +#MAKE#[1]: Leaving directory '#PWD#/foo' #MAKE#[1]: Entering directory '#PWD#/bar' bar: start +#MAKE#[1]: Leaving directory '#PWD#/bar' +#MAKE#[1]: Entering directory '#PWD#/bar' bar: end #MAKE#[1]: Leaving directory '#PWD#/bar' +#MAKE#[1]: Entering directory '#PWD#/foo' foo: end #MAKE#[1]: Leaving directory '#PWD#/foo'\n", 0, 6); |