簡體   English   中英

NetBeans無法識別Makefile.am

[英]NetBeans doesn't recognize Makefile.am

我來自Objective-C / Xcode背景。

我曾經使用已經導入XCode的C項目,但是現在我想分析一個對與項目集成感興趣的算法的現有實現

只是這個項目完全是用C編寫的,與Objective-C / Xcode等無關。

我不確定在Mac上查看純C項目的最佳方法是什么,因此我安裝了NetBeans for C / C ++。

問題是,當我嘗試在NetBeans上創建一個新項目並選擇C/C++ Project with Existing Sources它抱怨

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

更新

我嘗試了這個答案..但是我得到了以下信息:

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軟件包-ughh ...)

那應該生成配置腳本。 然后輸入:

./configure

它抱怨缺少一些GMime依賴項,因此我沒有看到它實際上生成了一個Makefile。 一旦到達生成Makefile的地步,就應該能夠將Netbeans指向“從現有資源打開項目”。

根據abbood的要求...

Netbeans對於C語言開發不是很好。 一種方法是圍繞源庫構建一個XCode項目。 項目的維護者甚至可以接受XCode項目作為貢獻。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM