Emacs “我怎样才能解决犯错误的问题?”;make[1]:I:未找到命令";

Emacs “我怎样才能解决犯错误的问题?”;make[1]:I:未找到命令";,emacs,compilation,makefile,cygwin,mingw,Emacs,Compilation,Makefile,Cygwin,Mingw,我尝试使用mingw64-x86_64软件包和Cygwin x84_64中的GNU make为本机Windows编译emacs-24.4 完成./configure脚本后,在执行make时,我得到了以下结果: [ -r "src/config.in" ] || ( cd . && autoheader ) cd nt && make all \ CC='x86_64-w64-mingw32-gcc -std=

我尝试使用mingw64-x86_64软件包和Cygwin x84_64中的GNU make为本机Windows编译emacs-24.4

完成./configure脚本后,在执行make时,我得到了以下结果:

[ -r "src/config.in" ] || ( cd . && autoheader )
cd nt && make all                          \
  CC='x86_64-w64-mingw32-gcc  -std=gnu99' CFLAGS='-g3 -O2 -gdwarf-2' CPPFLAGS='-mtune=generic  -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/ -DUSE_CRT_DLL=1 -I /cygdrive/d/workspace/emacs-24.4/nt/inc' \
  LDFLAGS='' MAKE='make'
make[1]: Entering directory '/cygdrive/d/workspace/emacs-24.4/nt'
I . -O coff -o emacs.res ./emacs.rc
make[1]: I: Command not found
Makefile:228: recipe for target 'emacs.res' failed
make[1]: [emacs.res] Error 127 (ignored)
x86_64-w64-mingw32-gcc  -std=gnu99 -mtune=generic    -I. -I.   -mtune=generic  -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/ -DUSE_CRT_DLL=1 -I /cygdrive/d/workspace/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2 ./runemacs.c emacs.res -mwindows \
         -o runemacs.exe
x86_64-w64-mingw32-gcc: error: emacs.res: No such file or directory
Makefile:224: recipe for target 'runemacs.exe' failed
make[1]: *** [runemacs.exe] Error 1
make[1]: Leaving directory '/cygdrive/d/workspace/emacs-24.4/nt'
Makefile:363: recipe for target 'nt' failed
make: *** [nt] Error 2

顺便说一句,我用命令更改了buildaux/msys-to-w32文件

sed "/s/pwd/cygpath/g" build-aux/msys-to-w32
运行时绕过错误的步骤。/configure

bash: pwd: -W: invalid option

这是nt/Makefile——有人知道如何解决这个错误吗

### nt/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 2013-2014 Free Software Foundation, Inc.

# This file is part of GNU Emacs.

# GNU Emacs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

# Avoid trouble on systems where the `SHELL' variable might be
# inherited from the environment.
SHELL = /bin/sh

# ==================== Things `configure' will edit ====================

CC=x86_64-w64-mingw32-gcc  -std=gnu99
CFLAGS=-g3 -O2 -gdwarf-2
version=24.4
## Used in $archlibdir.
configuration=x86_64-w64-mingw32
EXEEXT=.exe
C_SWITCH_SYSTEM=-mtune=generic
C_SWITCH_MACHINE=
PROFILING_CFLAGS =
WARN_CFLAGS =
WERROR_CFLAGS =

# Program name transformation.
TRANSFORM = s,x,x,

# ==================== Where To Install Things ====================

# The default location for installation.  Everything is placed in
# subdirectories of this directory.  The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them.  This is set with the --prefix option to
# `../configure'.
prefix=/cygdrive/d/workspace/emacs

# Like `prefix', but used for architecture-specific files.  This is
# set with the --exec-prefix option to `../configure'.
exec_prefix=${prefix}

# Where to install Emacs and other binaries that people will want to
# run directly (like etags).  This is set with the --bindir option
# to `../configure'.
bindir=${exec_prefix}/bin

# The root of the directory tree for read-only architecture-independent
# data files.  ${datadir}, ${infodir} and ${mandir} are based on this.
datarootdir=${prefix}/share

# Where to install architecture-independent data files.  ${lispdir}
# and ${etcdir} are subdirectories of this.  This is set with the
# --datadir option to `../configure'.
datadir=${datarootdir}

# Where to install and expect executable files to be run by Emacs
# rather than directly by users, and other architecture-dependent
# data.  ${archlibdir} is usually below this.  This is set with the
# --libexecdir option to `../configure'.
libexecdir=${exec_prefix}/libexec

# Directory for local state files for all programs.
localstatedir=${prefix}/var

# Where to find the source code.  This is set by the configure
# script's `--srcdir' option.  However, the value of ${srcdir} in
# this makefile is not identical to what was specified with --srcdir,
# since the variable here has `/lib-src' added at the end.

# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir=.


# The top-level source directory, also set by configure.
top_srcdir=..
# MinGW CPPFLAGS may use this.
abs_top_srcdir=/cygdrive/d/workspace/emacs-24.4

# ==================== Emacs-specific directories ====================

# These variables hold the values Emacs will actually use.  They are
# based on the values of the standard Make variables above.

# Where to put executables to be run by Emacs rather than the user.
# This path usually includes the Emacs version and configuration name,
# so that multiple configurations for multiple versions of Emacs may
# be installed at once.  This can be set with the --archlibdir option
# to `../configure'.
archlibdir=${libexecdir}/emacs/${version}/${configuration}

# ==================== Utility Programs for the Build =================

# ../configure figures out the correct values for these.
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
MKDIR_P = /usr/bin/mkdir -p

# ========================== Lists of Files ===========================

# Things that a user might actually run, which should be installed in bindir.
INSTALLABLES = runemacs${EXEEXT} addpm${EXEEXT}

# Things that Emacs runs internally, which should not be installed in bindir.
UTILITIES = cmdproxy${EXEEXT} ddeclient${EXEEXT}

# Things that Emacs runs during the build process.
DONT_INSTALL = addsection${EXEEXT}

# All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}

# =========================== Configuration ===========================

# MS-Windows resource files and resource compiler
EMACSRES = emacs.res
EMACS_MANIFEST = emacs-x64.manifest
WINDRES =

## Extra libraries to use when linking addpm.
LIBS_ADDPM = -lole32 -luuid

## Compilation and linking flags
BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
              $(WARN_CFLAGS) $(WERROR_CFLAGS) \
              -I. -I${srcdir}

ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}

all: ${EXE_FILES}

.PHONY: all

## Install the internal utilities.  Until they are installed, we can
## just run them directly from nt/.
$(DESTDIR)${archlibdir}: all
        @echo
        @echo "Installing utilities run internally by Emacs."
        umask 022; ${MKDIR_P} "$(DESTDIR)${archlibdir}"
        exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \
        if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \
          for file in ${UTILITIES}; do \
            $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file "$(DESTDIR)${archlibdir}/$$file" ; \
          done ; \
        fi

.PHONY: install uninstall mostlyclean clean distclean maintainer-clean
.PHONY: extraclean check tags

install: $(DESTDIR)${archlibdir}
        @echo
        @echo "Installing utilities for users to run."
        umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
        for file in ${INSTALLABLES} ; do \
          $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
        done
        ${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)"
        $(INSTALL_DATA) ${srcdir}/README.W32 "$(DESTDIR)${datadir}/emacs/$(version)"

uninstall:
        rm -f "$(DESTDIR)${datadir}/emacs/$(version)/README.W32"
        for file in ${INSTALLABLES}; do \
          rm -f "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
        done
        if [ -d "$(DESTDIR)${archlibdir}" ]; then \
          (cd "$(DESTDIR)${archlibdir}" && rm -f ${UTILITIES}) \
        fi

mostlyclean:
        -rm -f core *.o *.res

clean: mostlyclean
        -rm -f ${EXE_FILES}

distclean: clean
        -rm -f TAGS
        -rm -f Makefile

maintainer-clean: distclean
        true

extraclean: maintainer-clean
        -rm -f *~ \#*

## Test the contents of the directory.
check:
        @echo "We don't have any tests for the nt/ directory yet."

tags: TAGS
TAGS: ${EXE_FILES:${EXEEXT}=.c}
        ../lib-src/etags *.[ch]

## Build the programs
addsection${EXEEXT}: ${srcdir}/addsection.c
        $(CC) ${ALL_CFLAGS} ${srcdir}/addsection.c -o addsection${EXEEXT}

addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
        $(CC) ${ALL_CFLAGS} ${srcdir}/addpm.c $(LIBS_ADDPM) -o addpm${EXEEXT}

ddeclient${EXEEXT}: ${srcdir}/ddeclient.c
        $(CC) ${ALL_CFLAGS} ${srcdir}/ddeclient.c -o ddeclient${EXEEXT}

cmdproxy${EXEEXT}: ${srcdir}/cmdproxy.c
        $(CC) ${ALL_CFLAGS} ${srcdir}/cmdproxy.c -o cmdproxy${EXEEXT}

runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES)
        $(CC) ${ALL_CFLAGS} ${srcdir}/runemacs.c $(EMACSRES) -mwindows \
         -o runemacs${EXEEXT}

emacs.res: ${srcdir}/emacs.rc ${srcdir}/icons/emacs.ico ${srcdir}/$(EMACS_MANIFEST)
        ${WINDRES} -I ${srcdir} -O coff -o emacs.res ${srcdir}/emacs.rc
####nt/Makefile。通过配置从Makefile.in生成。
版权所有(C)2013-2014自由软件基金会。
#此文件是GNU Emacs的一部分。
#GNU Emacs是自由软件:您可以重新发布和/或修改它
#它是根据GNU通用公共许可证的条款发布的
自由软件基金会,或者许可证的第3版,或者
#(由您选择)任何更高版本。
#分发GNU Emacs是希望它会有用,
#但无任何保证;甚至没有任何关于
#适销性或适合某一特定目的。见
#有关更多详细信息,请参阅GNU通用公共许可证。
#您应该已经收到GNU通用公共许可证的副本
#以及GNU Emacs。如果没有,请参阅。
#避免在可能使用“SHELL”变量的系统上出现问题
#从环境中继承下来的。
SHELL=/bin/sh
#==============================将编辑“配置”中的内容====================
CC=x86_64-w64-mingw32-gcc-std=gnu99
CFLAGS=-g3-O2-gdwarf-2
版本=24.4
##在$archlibdir中使用。
配置=x86_64-w64-mingw32
EXEXT=.exe
C_开关_系统=-mtune=通用
C_开关_机器=
剖析=
警告=
WERROR_CFLAGS=
#程序名转换。
变换=s,x,x,
#==============================在哪里安装东西====================
#安装的默认位置。所有的东西都放在箱子里
#此目录的子目录。许多应用程序的默认值
#下面的变量是用这个来表示的,所以你可以
#不需要改变它们。这是通过--prefix选项设置为
#`../configure'。
前缀=/cygdrive/d/workspace/emacs
#类似于“前缀”,但用于特定于体系结构的文件。这是
#将--exec prefix选项设置为“../configure”。
exec_prefix=${prefix}
#在哪里安装人们想要的Emacs和其他二进制文件
#直接运行(如ETag)。这是通过--bindir选项设置的
#到“../configure”。
bindir=${exec_prefix}/bin
#只读体系结构独立的目录树的根
#数据文件${datadir}、${infodir}和${mandir}基于此。
datarootdir=${prefix}/共享
#在何处安装独立于体系结构的数据文件${lispdir}
#和${etcdir}是此目录的子目录。这是以
#--datadir选项到“../configure”。
datadir=${datarootdir}
#在何处安装并期望Emacs运行可执行文件
#而不是直接由用户和其他依赖于体系结构的
#数据${archlibdir}通常低于此值。这是以
#--libexecdir选项到“../configure”。
libexecdir=${exec_prefix}/libexec
#所有程序的本地状态文件的目录。
localstatedir=${prefix}/var
#在哪里可以找到源代码。这是由配置设置的
#脚本的“--srcdir”选项。但是,${srcdir}的值
#此生成文件与用--srcdir,
#因为这里的变量在末尾添加了“/lib src”。
#我们在依赖项中显式地使用$(srcdir),以便不依赖于VPATH。
srcdir=。
#顶级源目录,也由configure设置。
top_srcdir=。。
#MinGW CPPFLAGS可能会使用此选项。
abs\u top\u srcdir=/cygdrive/d/workspace/emacs-24.4
#===============================Emacs特定目录====================
#这些变量包含Emacs实际使用的值。他们是
#基于上述标准值,生成变量。
#将由Emacs而不是用户运行的可执行文件放在何处。
#此路径通常包括Emacs版本和配置名称,
#因此,可以为多个版本的Emacs提供多个配置
#立即安装。这可以通过--archlibdir选项设置
#到“../configure”。
archlibdir=${libexecdir}/emacs/${version}/${configuration}
#===============================用于生成的实用程序=================
#../configure计算出这些的正确值。
INSTALL=/usr/bin/INSTALL-c
INSTALL_DATA=${INSTALL}-m 644
安装程序=${INSTALL}
INSTALL_SCRIPT=${INSTALL}
#默认情况下,我们维护项目的尊严。
安装密封条=
MKDIR_P=/usr/bin/MKDIR-P
#=====================================文件列表===========================
#用户可能实际运行的东西,应该安装在bindir中。
INSTALLABLES=runemacs${execext}addpm${execext}
#Emacs内部运行的东西,不应该安装在bindir中。
UTILITIES=cmdproxy${EXEXEXT}ddeclient${EXEXEXT}
#Emacs在构建过程中运行的东西。
DONT_INSTALL=addsection${execext}
#由链接器创建的所有文件,即名称以${EXEXEXT}结尾的文件。
EXE_FILES=${INSTALLABLES}${UTILITIES}${DONT_INSTALL}
#=====================================配置===========================
#MS Windows资源文件和资源编译器
EMACSRES=emacs.res
EMACS_MANIFEST=EMACS-x64.MANIFEST
温德斯=
##链接addpm时要使用的额外库。
LIBS_ADDPM=-lole32-luuid
##编译和链接标志
基本\u CFLAGS=$(C\u开关\u系统)$(C\u开关\u机器)\
$(警告)$(警告)\
-I.-I${srcdir}
ALL_CFLAGS=${BASE_CFLAGS}${PROFILING_CFLAGS}${LDFLAGS}${CPPFLAGS}${CFLAGS}
LINK_CFLAGS=${BASE_CFLAGS}${LDFLAGS}${CFLAGS}
CPP_CFLAGS=${BASE_CFLAGS}${PROFILING_CFLAGS}${CPPFLAGS}${CFLAGS}
所有:${EXE_文件}
冒牌货:全部
##安装内部实用程序。在安装之前,我们可以
##只需直接从nt/运行它们。
$(DESTDIR)${archlibdir}:全部
@回音
@echo“安装Emacs内部运行的实用程序”
乌马斯克022${MKDIR_P
WINDRES =
emacs.res: ${srcdir}/emacs.rc ${srcdir}/icons/emacs.ico ${srcdir}/$(EMACS_MANIFEST)
        ${WINDRES} -I ${srcdir} -O coff -o emacs.res ${srcdir}/emacs.rc