📄 dash-w
字号:
# -*-perl-*-$description = "Test make -W (what if) option.\n";# Basic buildrun_make_test('a.x: b.xa.x b.x: ; echo >> $@', '', "echo >> b.x\necho >> a.x");# Run it again: nothing should happenrun_make_test(undef, '', "#MAKE#: `a.x' is up to date.");# Now run it with -W b.x: should rebuild a.xrun_make_test(undef, '-W b.x', 'echo >> a.x');# Put the timestamp for a.x into the future; it should still be remade.utouch(1000, 'a.x');run_make_test(undef, '', "#MAKE#: `a.x' is up to date.");run_make_test(undef, '-W b.x', 'echo >> a.x');# Clean uprmfiles('a.x', 'b.x');# Test -W with the re-exec feature: we don't want to re-exec forever# Savannah bug # 7566# First set it up with a normal buildrun_make_test('all: baz.x ; @:include foo.xfoo.x: bar.x @echo "\$$(info restarts=\$$(MAKE_RESTARTS))" > $@ @echo "touch $@"bar.x: ; echo >> $@baz.x: bar.x ; @echo "touch $@"', '', '#MAKEFILE#:3: foo.x: No such file or directoryecho >> bar.xtouch foo.xrestarts=1touch baz.x');# Now run with -W bar.x# Tweak foo.x's timestamp so the update will change it.&utouch(1000, 'foo.x');run_make_test(undef, '-W bar.x', "restarts=\ntouch foo.x\nrestarts=1\ntouch baz.x");rmfiles('foo.x', 'bar.x');# Test -W on vpath-found files: it should take effect.# Savannah bug # 15341mkdir('x-dir', 0777);utouch(-20, 'x-dir/x');touch('y');run_make_test('y: x ; @echo cp $< $@', '-W x-dir/x VPATH=x-dir', 'cp x-dir/x y');# Make sure ./ stripping doesn't interfere with the match.run_make_test('y: x ; @echo cp $< $@', '-W ./x-dir/x VPATH=x-dir', 'cp x-dir/x y');run_make_test(undef, '-W x-dir/x VPATH=./x-dir', 'cp ./x-dir/x y');unlink(qw(y x-dir/x));rmdir('x-dir');1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -