Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | $(shell \ |
michael@0 | 2 | mkdir -p src/subd; \ |
michael@0 | 3 | mkdir subd; \ |
michael@0 | 4 | touch dummy; \ |
michael@0 | 5 | sleep 2; \ |
michael@0 | 6 | touch subd/test.out src/subd/test.in2; \ |
michael@0 | 7 | sleep 2; \ |
michael@0 | 8 | touch subd/test.out2 src/subd/test.in; \ |
michael@0 | 9 | sleep 2; \ |
michael@0 | 10 | touch subd/host_test.out subd/host_test.out2; \ |
michael@0 | 11 | sleep 2; \ |
michael@0 | 12 | touch host_prog; \ |
michael@0 | 13 | ) |
michael@0 | 14 | |
michael@0 | 15 | VPATH = src |
michael@0 | 16 | |
michael@0 | 17 | all: prog host_prog prog dir/ |
michael@0 | 18 | test "$@" = "all" |
michael@0 | 19 | test "$<" = "prog" |
michael@0 | 20 | test "$^" = "prog host_prog dir" |
michael@0 | 21 | test "$?" = "prog host_prog dir" |
michael@0 | 22 | test "$+" = "prog host_prog prog dir" |
michael@0 | 23 | test "$(@D)" = "." |
michael@0 | 24 | test "$(@F)" = "all" |
michael@0 | 25 | test "$(<D)" = "." |
michael@0 | 26 | test "$(<F)" = "prog" |
michael@0 | 27 | test "$(^D)" = ". . ." |
michael@0 | 28 | test "$(^F)" = "prog host_prog dir" |
michael@0 | 29 | test "$(?D)" = ". . ." |
michael@0 | 30 | test "$(?F)" = "prog host_prog dir" |
michael@0 | 31 | test "$(+D)" = ". . . ." |
michael@0 | 32 | test "$(+F)" = "prog host_prog prog dir" |
michael@0 | 33 | @echo TEST-PASS |
michael@0 | 34 | |
michael@0 | 35 | dir/: |
michael@0 | 36 | test "$@" = "dir" |
michael@0 | 37 | test "$<" = "" |
michael@0 | 38 | test "$^" = "" |
michael@0 | 39 | test "$(@D)" = "." |
michael@0 | 40 | test "$(@F)" = "dir" |
michael@0 | 41 | mkdir $@ |
michael@0 | 42 | |
michael@0 | 43 | prog: subd/test.out subd/test.out2 |
michael@0 | 44 | test "$@" = "prog" |
michael@0 | 45 | test "$<" = "subd/test.out" |
michael@0 | 46 | test "$^" = "subd/test.out subd/test.out2" # ^ |
michael@0 | 47 | test "$?" = "subd/test.out subd/test.out2" # ? |
michael@0 | 48 | cat $< |
michael@0 | 49 | test "$$(cat $<)" = "remade" |
michael@0 | 50 | test "$$(cat $(word 2,$^))" = "" |
michael@0 | 51 | |
michael@0 | 52 | host_prog: subd/host_test.out subd/host_test.out2 |
michael@0 | 53 | @echo TEST-FAIL No need to remake |
michael@0 | 54 | |
michael@0 | 55 | %.out: %.in dummy |
michael@0 | 56 | test "$@" = "subd/test.out" |
michael@0 | 57 | test "$*" = "subd/test" # * |
michael@0 | 58 | test "$<" = "src/subd/test.in" # < |
michael@0 | 59 | test "$^" = "src/subd/test.in dummy" # ^ |
michael@0 | 60 | test "$?" = "src/subd/test.in" # ? |
michael@0 | 61 | test "$+" = "src/subd/test.in dummy" # + |
michael@0 | 62 | test "$(@D)" = "subd" |
michael@0 | 63 | test "$(@F)" = "test.out" |
michael@0 | 64 | test "$(*D)" = "subd" |
michael@0 | 65 | test "$(*F)" = "test" |
michael@0 | 66 | test "$(<D)" = "src/subd" |
michael@0 | 67 | test "$(<F)" = "test.in" |
michael@0 | 68 | test "$(^D)" = "src/subd ." # ^D |
michael@0 | 69 | test "$(^F)" = "test.in dummy" |
michael@0 | 70 | test "$(?D)" = "src/subd" |
michael@0 | 71 | test "$(?F)" = "test.in" |
michael@0 | 72 | test "$(+D)" = "src/subd ." # +D |
michael@0 | 73 | test "$(+F)" = "test.in dummy" |
michael@0 | 74 | printf "remade" >$@ |
michael@0 | 75 | |
michael@0 | 76 | %.out2: %.in2 dummy |
michael@0 | 77 | @echo TEST_FAIL No need to remake |
michael@0 | 78 | |
michael@0 | 79 | .PHONY: all |