objective-c - NetBeans 无法识别 Makefile.am

标签 objective-c ios c netbeans compilation

我有 Objective-C/Xcode 背景。

我习惯于使用已导入 XCode 的 C 项目,但现在我想分析现有的 implementation algorithm的我有兴趣与我的项目集成。

只是这个项目完全用C编写,与Objective-C/Xcode等无关。

我不确定查看纯粹的C project的最佳方式是什么?在 Mac 上,所以我安装了用于 C/C++ 的 NetBeans。

问题是,当我尝试在 NetBeans 上创建新项目并选择带有现有源的 C/C++ 项目时,它会提示

no make files or configure scripts were found 

在根目录中..虽然它显然有一个Makefile.am

我知道 Balsa 项目是为 Linux 编写的,但我对构建二进制文件不感兴趣,我只想以 IDE 的方式查看源代码(即我可以单击函数调用并查看在哪里它已实现等)。

简而言之,我的问题是为什么 NetBeans 无法识别我的 Makefile.am

这里是Makefile.am的内容,仅供引用

#intl dir needed for tarball --disable-nls build.
DISTCHECK_CONFIGURE_FLAGS=--disable-extra-mimeicons --without-gnome --without-html-widget
SUBDIRS = po sounds images doc libbalsa libinit_balsa src
# set tar in case it is not set by automake or make

man_MANS=balsa.1

pixmapdir = $(datadir)/pixmaps
pixmap_DATA = gnome-balsa2.png

desktopdir = $(datadir)/applications
desktop_in_files = balsa.desktop.in balsa-mailto-handler.desktop.in
desktop_DATA = balsa.desktop balsa-mailto-handler.desktop
@INTLTOOL_DESKTOP_RULE@

balsa_extra_dist =      \
    GNOME_Balsa.server.in   \
    HACKING         \
    balsa-mail-style.xml    \
    balsa-mail.lang     \
    balsa.1.in      \
    balsa.spec.in       \
    bootstrap.sh        \
    docs/mh-mail-HOWTO  \
    docs/pine2vcard     \
    docs/vconvert.awk   \
    $(desktop_in_files) \
    gnome-balsa2.png    \
    intltool-extract.in \
    intltool-merge.in   \
    intltool-update.in  \
    mkinstalldirs

if BUILD_WITH_G_D_U
balsa_g_d_u_extra_dist = gnome-doc-utils.make
endif

if !BUILD_WITH_UNIQUE
serverdir               = $(libdir)/bonobo/servers
server_in_files         = GNOME_Balsa.server
server_DATA             = $(server_in_files:.server.in=.server)

$(server_in_files): $(server_in_files).in
    sed -e "s|\@bindir\@|$(bindir)|" $< > $@

endif

EXTRA_DIST =            \
    $(balsa_extra_dist)     \
    $(balsa_g_d_u_extra_dist)

if BUILD_WITH_GTKSOURCEVIEW2
gtksourceviewdir = $(BALSA_DATA_PREFIX)/gtksourceview-2.0
gtksourceview_DATA = balsa-mail.lang        \
    balsa-mail-style.xml
endif

DISTCLEANFILES = $(desktop_DATA) $(server_DATA) \
    intltool-extract intltool-merge intltool-update \
    gnome-doc-utils.make


dist-hook: balsa.spec
    cp balsa.spec $(distdir)

@MAINT@RPM: balsa.spec
@MAINT@ rm -f *.rpm
@MAINT@ $(MAKE) distdir="$(PACKAGE)-@BALSA_VERSION@" dist
@MAINT@ cp $(top_srcdir)/rpm-po.patch $(top_builddir)/rpm-po.patch
@MAINT@ rpm -ta "./$(PACKAGE)-@BALSA_VERSION@.tar.gz"
@MAINT@ rm $(top_builddir)/rpm-po.patch
@MAINT@ -test -f "/usr/src/redhat/SRPMS/$(PACKAGE)-@VERSION@-@BALSA_RELEASE@.src.rpm" \
@MAINT@     && cp -f "/usr/src/redhat/SRPMS/$(PACKAGE)-@VERSION@-@BALSA_RELEASE@.src.rpm" .
@MAINT@ -for ping in /usr/src/redhat/RPMS/* ; do \
@MAINT@     if test -d $$ping ; then \
@MAINT@         arch=`echo $$ping |sed -e 's,/.*/\([^/][^/]*\),\1,'` ; \
@MAINT@         f="$$ping/$(PACKAGE)-@VERSION@-@BALSA_RELEASE@.$$arch.rpm" ; \
@MAINT@         test -f $$f && cp -f $$f . ; \
@MAINT@     fi ; \
@MAINT@ done

@MAINT@snapshot:
@MAINT@ $(MAKE) distdir=$(PACKAGE)-`date +"%y%m%d"` dist

@MAINT@balsa-dcheck:
@MAINT@ $(MAKE) BALSA_DISTCHECK_HACK=yes distcheck

## to automatically rebuild aclocal.m4 if any of the macros in
## `macros/' change
bzdist: distdir
    @test -n "$(AMTAR)" || { echo "AMTAR undefined. Run make bzdist AMTAR=gtar"; false; }
    -chmod -R a+r $(distdir)
    $(AMTAR) chojf $(distdir).tar.bz2 $(distdir)
    -rm -rf $(distdir)

# macros are not used any more by current configure.in, see also
# post by Ildar Mulyukov to balsa-list, 2006.06.27
# ACLOCAL_AMFLAGS = -I macros

更新

我试过this答案..但我得到以下信息:

autoreconf --install
configure.in:250: warning: macro `AM_GLIB_GNU_GETTEXT' not found in library
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
glibtoolize: copying file `m4/libtool.m4'
glibtoolize: copying file `m4/ltoptions.m4'
glibtoolize: copying file `m4/ltsugar.m4'
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
glibtoolize: Remember to add `LT_INIT' to configure.in.
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
glibtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'
configure.in:250: warning: macro `AM_GLIB_GNU_GETTEXT' not found in library
configure.in:249: error: possibly undefined macro: AC_PROG_INTLTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:250: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
configure.in:301: error: possibly undefined macro: AC_MSG_ERROR
autoreconf: /usr/bin/autoconf failed with exit status: 1

我正在考虑使用输出中的建议..

最佳答案

有趣。我刚刚尝试下载“balsa”,注意到他们分发了 Makefile.am 和 configure.in 文件,而不是准备运行的配置脚本。您可以让软件包维护者知道,他们不预编译自己的自动工具源代码并没有给任何人带来任何好处。

Makefile.am 不是真正的 Makefile。它生成 Makefile.in,然后由配置脚本将其转换为真正的 Makefile。

尝试以下步骤:

再次干净地将源下载到 balsa。然后从命令提示符处键入以下内容:

autoreconf --install

(如果您没有 autoreconf,您可能需要安装 autotools 软件包 - 呃...)

这应该生成配置脚本。然后输入:

./configure

它提示缺少一些 GMime 依赖项,因此我没有看到它实际生成 Makefile。一旦生成 Makefile,您应该能够将 Netbeans 指向“从现有源打开项目”。

关于objective-c - NetBeans 无法识别 Makefile.am,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14030605/

相关文章:

iphone - 关闭模态视图

c++ - 如何使用带有标题和 .so 文件的库?

c++ - 如何在 C++ 中按名称检索 Cocoa 枚举值?

ios - UIView动画最后被取消

c++ - 如何获得正在监听的端口列表及其各自的应用程序名称

c - 为什么点分十进制的最后一个数字不转换为二进制?

c - 用 C 编写汇编语言

objective-c - 从 NSArray 返回自动释放对象?

ios - 禁用除最后一个单元格之外的所有 UITableView 单元格 - Swift

ios - 将NSMutableArray保存到NSUserDefaults