0

我正在重新编写一个古老且非常破败的构建,并且遇到了一条规则,其中包含我以前从未见过的东西。它看起来像这样:

%_ui.cc:
     ${SOME_UTILITY} ${*}
     sed '/\#include "${*}.h"/d' > tempstubs.cc ${*}_stubs.cc
     /bin/csh -c 'if (-w ${*}_stubs.cc ) cp -f tempstubs.cc ${*}_stubs.cc'
     -rm -f tempstubs.cc

sed行是我所指的行。我从未见过像 > 之后有两个文件的重定向。

4

1 回答 1

1

没关系,想通了。sed 行可以重写为:

sed 'do whatever' ${*}_stubs.cc > tempstubs.cc

...并且在语义上似乎是相同的。

于 2011-08-19T19:26:51.417 回答