Makefile看不懂 - Linux

Table of Contents


請教各位大大
下面是GNU Make 4.14 Generating prerequisites automatically的一段rule

Here is the pattern rule to generate a file of prerequisites (i.e., a
makefile) called `name.d' from a C source file called `name.c':


%.d: %.c
@set -e; rm -f $@; \
$(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ <------不懂
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ <----不懂
rm -f $@.$$$$

主要是不懂第二行$@.$$$$後面的$$$$是什麼意思
第三行 sed有人能幫我分解一下嗎 感謝

--

All Comments

Jacob avatarJacob2011-03-07
$$$$ 的意思 http://ppt.cc/!45z
(簡單來說就是取得 pid 當作是個亂數)
Ivy avatarIvy2011-03-10
謝謝^^