Chinaunix

标题: make一次打印两次 [打印本页]

作者: hb775    时间: 2015-08-16 11:49
标题: make一次打印两次
现在有一个测试,就是make时应该只执行一次的sinclude,却执行了两次,请大神分析原因。
测试如下:

tst.c
int main(void)
{
     return 0;
}

tst.h


Makefile
all:
sinclude bb
sinclude autoconf.mk

all:
    gcc -o tst tst.c

autoconf.mk:tst.h
     sed -n -f tst.sed tst.c > $@.tmp && \
     mv $@.tmp $@
bb:
     @echo Just a Test......
clean:
     -rm -f autoconf.mk tst autoconf.mk.tmp


tst.sed
/^#define */ {
}





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2