Makefile を STDIN から渡す2008年03月09日 12時48分52秒

ふと、make の -f オプションに標準入力を使えるか不思議に思って試してみた。

% cat stdin.txt
test :
        echo input from STDIN
% cat stdin.txt | make -f -
echo input from STDIN
input from STDIN
% cat stdin.txt | gmake -f -
echo input from STDIN
input from STDIN

動く。ただ、どの様に使うと便利なのかは、まだ思い付かない。