检查项目上的框架集成未能构建

Check framework integration on project failed to build

我正在为我的项目集成 C 检查框架,我能够 运行

autoreconf --install

成功,没有任何错误。

但是当我集成 C 检查框架时,我收到了一个没有意义的错误和警告。

这是我遇到的错误

src/Makefile.am:7: warning: variable 'main_LDADD' is defined but no program or 
src/Makefile.am:7: library has 'main' as canonical name (possible typo)
tests/Makefile.am:2: error: 'SHELLTESTS_PROGRAMS' is used but 'SHELLTESTSdir' is undefined
tests/Makefile.am:3: warning:variable 'ShellTests_SOURCES' is defined but no program or
tests/Makefile.am:3: library has 'ShellTests' as canonical name (possible typo)  
tests/Makefile.am:5: warning: variable ShellTests_LDADD' is defined but no program or 
tests/Makefile.am:5:library has 'ShellTests' as canonical name (possible typo) 
                   autoreconf:automake failed with exit status: 1

我遵循了 C 检查示例源代码,它与我的项目的区别在于我的 class 使用了其他 class' 方法。

无论如何,这是我测试中的 Makefile.am/ 导致 'havoc' 构建项目

TESTS = shelltests
SHELLTESTS_PROGRAMS = shelltests

ShellTests_SOURCES = ShellTests.c $(top_builddir)/src/Shell.h $(top_builddir)/src/Parser.h $(top_builddir)/src/JobControl.h
ShellTests_CFLAGS = @CHECK_CFLAGS@
ShellTests_LDADD = $(top_builddir)/src/libshell.la @CHECK_LIBS@

这是我项目的文件结构
来源 - Parser.h、Parser.c、Shell.h、Shell.c、Job.h、Job.c、Makefile.am
测试 - ShellTests.cMakefile.am

这是src下Makefile.am中的代码。

lib_LTLIBRARIES = libshell.la 
libshell_la_SOURCES = Shell.c Shell.h Parser.h Parser.c JobControl.h JobControl.c
bin_programs = main 
main_sources = Main.c  
main_LDADD = libshell.la

我听从了这位用户的建议,看看它是否消除了错误:What directory should I use for "error: 'extra_PROGRAMS' is used but 'extradir' is undefined"? las,事实并非如此。

我已经尝试构建示例项目 - 您在示例下下载时得到的项目,看看我是否遗漏了什么。但它无法在我的机器上构建。

我在 Mac OS X Mavericks (10.9)

为了成功构建这个项目,我做了一些事情。我首先按照我在这里概述的内容进行操作:

然后我遵循了 c 检查框架的测试源文件命名约定。

感谢大家的帮助,让我对编译错误的原因有了一些了解。