应用程序正在尝试配置
sudo make configure
(cd /opt/ioapi-3.2/ioapi ; sed -e 's|IOAPI_BASE|/opt/ioapi-3.2|' -e 's|LIBINSTALL||' -e 's|BININSTALL||' -e 's|IOAPI_DEFS||' -e 's|NCFLIBS|-L/opt/netcdf/lib -lnetcdff -L/opt/netcdf/lib -lnetcdf|' -e 's|MAKEINCLUDE|include /opt/ioapi-3.2/ioapi/Makeinclude|' -e 's|PVMINCLUDE|include |' < Makefile..sed > Makefile )
/bin/sh: Makefile..sed: No such file or directory
make: *** [Makefile:211: configure] Error 1
我不明白命令的最后一部分应该做什么,以及为什么它会产生错误。
的输出make -n configure
是:
(cd /home/centos/ioapi-3.2/ioapi ; sed -e 's|IOAPI_BASE|/home/centos/ioapi-3.2|' -e 's|LIBINSTALL||' -e 's|BININSTALL||' -e 's|IOAPI_DEFS||' -e 's|NCFLIBS|-lnetcdff -lnetcdf|' -e 's|MAKEINCLUDE|include /home/centos/ioapi-3.2/ioapi/Makeinclude|' -e 's|PVMINCLUDE|include |' < Makefile..sed > Makefile )
(cd /home/centos/ioapi-3.2/m3tools ; sed -e 's|IOAPI_BASE|/home/centos/ioapi-3.2|' -e 's|LIBINSTALL||' -e 's|BININSTALL||' -e 's|IOAPI_DEFS||' -e 's|NCFLIBS|-lnetcdff -lnetcdf|' -e 's|MAKEINCLUDE|include /home/centos/ioapi-3.2/ioapi/Makeinclude|' -e 's|PVMINCLUDE|include |' < Makefile..sed > Makefile )
答案1
查看项目Makefile.template
的文件ioapic-3.2
在 GitHub 上,很明显,您看到的命令是使用变量sed
的结果:make
SEDCMD
SEDCMD = \
-e 's|IOAPI_BASE|$(BASEDIR)|' \
-e 's|LIBINSTALL|$(LIBINST)|' \
-e 's|BININSTALL|$(BININST)|' \
-e 's|IOAPI_DEFS|$(IOAPIDEFS)|' \
-e 's|NCFLIBS|$(NCFLIBS)|' \
-e 's|MAKEINCLUDE|include $(IODIR)/Makeinclude|' \
-e 's|PVMINCLUDE|include $(PVMINCL)|'
像这样:
configure: ${IODIR}/Makefile ${TOOLDIR}/Makefile
(cd $(IODIR) ; sed $(SEDCMD) < Makefile.$(CPLMODE).sed > Makefile )
(cd $(TOOLDIR) ; sed $(SEDCMD) < Makefile.$(CPLMODE).sed > Makefile )
正如您所看到的,它尝试读取一个名为Makefile.$(CPLMODE).sed
.该CPLMODE
变量被多次提及在评论中在 Makefile 中,但从未设置为默认值。
该变量的有效值为nocpl
、cpl
或pncf
。存储库中的文件README.txt
说要自定义 Makefile,我必须假设这包括在项目的顶级目录中创建一个Makefile.template
名为的副本,然后对其进行修改。Makefile
看起来您还没有对其进行所有必要的修改。