Here is the pattern rule to generate a file of dependencies (i.e., a makefile)
called `name.d' from a C source file called `name.c':
%.d: %.c
$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< | sed '\"s/$*.o/& $@/g'\" > $@'
不太明白sed里面的 \"是什么意思啊?
sed跟make都不熟悉,弱问,多谢!!
问个makefile和shell的问题
-
- 帖子: 3
- 注册时间: 2007-05-26 10:35
- yaoms
- 帖子: 4952
- 注册时间: 2007-10-19 14:51
- 来自: 深圳
Re: 问个makefile和shell的问题
代码: 全选
$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< | sed '\''s/$*.o/& $@/g'\'' > $@'
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
alias 爱慕颇雷尔='mplayer'
-
- 帖子: 3
- 注册时间: 2007-05-26 10:35
Re: 问个makefile和shell的问题
双引号改成两个单引号??