【发布时间】:2009-11-25 20:33:58
【问题描述】:
我想创建一个Makefile.am 文件,它会生成一个在xxx.c 文件中提到的头文件。
假设xxx.c 包含:
#include <version.h>
...
并且我有一个规则可以在Makefile.am 的末尾创建它:
version.h:
echo '#define VERSION "'`hg id`'"' > version.h.tmp
cmp version.h.tmp version.h || mv version.h.tmp version.h
要使xxx.c 编译依赖于version.h,我需要进行哪些更改?我试过nodist_progname_SOURCES=version.h,但好像不行。
【问题讨论】:
标签: dependencies automake header-files