[問題] Makefile看不懂

看板Linux作者時間13年前 (2011/03/03 23:22), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串1/1
請教各位大大 下面是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有人能幫我分解一下嗎 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.218.179

03/03 23:56, , 1F
$$$$ 的意思 http://ppt.cc/!45z
03/03 23:56, 1F

03/03 23:56, , 2F
(簡單來說就是取得 pid 當作是個亂數)
03/03 23:56, 2F

03/04 00:26, , 3F
謝謝^^
03/04 00:26, 3F
文章代碼(AID): #1DRx8tdf (Linux)