簡體   English   中英

'distdir-am' 所需的目標'bootstrap' 沒有規則。 停止

[英]No rule to make target 'bootstrap', needed by 'distdir-am'. Stop

使用 automake 來“制作 dist”時,我遇到了以下問題。 下面是編譯器報告的錯誤的快照。 我正在使用 Debian 10.5,默認編譯器版本為 8.0.3; 自動配置 2.69; 自動制作 1.16.1,libtool 2.4.6

######## Problem ########

aperri@debian:~/XerlangCPL2$ make dist
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/aperri/XerlangCPL2'
make  distdir-am
make[2]: Entering directory '/home/aperri/XerlangCPL2'
make[2]: *** No rule to make target 'bootstrap', needed by 'distdir-am'.  Stop.
make[2]: Leaving directory '/home/aperri/XerlangCPL2'
make[1]: *** [Makefile:633: distdir] Error 2
make[1]: Leaving directory '/home/aperri/XerlangCPL2'
make: *** [Makefile:710: dist] Error 2 

我在此消息中包含了我的 configure.ac 和 makefile.am,希望有解決此問題的方法

######## configure.ac ########

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([XerlangCPL], [1.0], [aperri1001@gmail.com])
AC_CONFIG_SRCDIR([src/xmlPROC.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])

# Enable "automake" to simplify creating Makefiles
AM_INIT_AUTOMAKE([1.16.1 subdir-objects -Wall -Werror])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])


# Checks for programs.
AC_PROG_CC
AC_PROG_CXXCPP
AC_PROG_CXX
# Used in conjuction with {TARGET}_CPPFLAGS = -DDEBUG in Makefile.am
AM_PROG_CC_C_O

# Checks for libraries.
AX_BOOST_BASE([1.67], [], AC_MSG_ERROR([Could not find a useful version of boost]))
AX_BOOST_FILESYSTEM
AX_BOOST_SYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_REGEX
# AX_BOOST_DATE_TIME
# AX_BOOST_THREAD

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions
PKG_CHECK_MODULES(libxml, libxml++-2.6 >= 2.10.0 )


AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AC_CONFIG_FILES([Makefile doc/Doxyfile])

# AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
# AC_ARG_WITH(debug, [  --with-debug  add the debugging module], [AC_DEFINE(WITH_DEBUG,1,0)
# AC_SUBST(WITH_DEBUG,1)
# CXXFLAGS="-O0 -ggdb"])


AC_OUTPUT

echo "
  XErlang Compiler ($PACKAGE_NAME) version $PACKAGE_VERSION
  Prefix.........: $prefix
  Debug Build....: $debug
  C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS
  Linker.........: $LD $LDFLAGS $LIBS
"
######## makefile.am ########

ACLOCAL_AMFLAGS = -I m4 --install

bin_PROGRAMS = xerlangCPL
xerlangCPL_SOURCES = \
    src/xmlPROC.cpp \
    src/xml_structs.h \
    src/debug.h \
    src/conxsTracker.cpp \
    src/conxs_tracker.h \
    src/xmlConxsParser.cpp \
    src/oven_control


xerlangCPL_LDFLAGS = -DDEBUG \
                     $(libxml_LIBS) \
                     $(BOOST_LDFLAGS) \
                     $(BOOST_SYSTEM_LDFLAGS) \
                     $(BOOST_FILESYSTEM_LDFLAGS) \
                     $(BOOST_PROGRAM_OPTIONS_LDFLAGS)

xerlangCPL_CPPFLAGS = $(libxml_CFLAGS) \
                      $(BOOST_CPPFLAGS)


xerlangCPL_LIBS = $(BOOST_SYSTEM_LIBS) \
                  $(BOOST_FILESYSTEM_LIBS) \
                  $(BOOST_PROGRAM_OPTIONS_LIBS)

xerlangCPL_CXXFLAGS = -lboost_filesystem -ldl -lboost_system

# start of Doxygen section
if HAVE_DOXYGEN

doxyfile.stamp:
    $(DOXYGEN) $(top_srcdir)/doc/Doxyfile
    echo Timestamp > $@


CLEANFILES = $(top_srcdir)/doxyfile.stamp

# all-local: doxyfile.stamp
all-local: doxyfile.stamp
# clean-local:
#     rm -rf $(top_srcdir)/
endif

EXTRA_DIST = bootstrap m4/NOTES 

問題可能與包含 Boost Modules 或缺少它們有關。

問題是EXTRA_DIST列出了一些名為bootstrap的神秘文件。

Makefile.am沒有提供構建此文件的說明。

因此,該文件應該已經存在於構建目錄中,但實際上並不存在。

這就是你make dist失敗的原因。

丟失文件的原因是您必須自己弄清楚的原因,這里唯一可以說明的是它的缺失是您構建失敗的原因。

你當然可以

touch bootstrap

並在構建目錄中創建一個空文件,這樣就足夠了。 但是你應該在你的項目中調查這個文件是什么,它應該來自哪里,並相應地修復問題。

暫無
暫無

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

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