1

我目前正在开发一个项目,该项目还应该提供一个源包以打包到 linux 系统中。由于我使用的是monodevelop,所以我使用了

mdtool generate-makefiles AudioCuesheetEditor.sln --simple-makefiles

生成makefile等 但是有一个小问题。在某些系统上,运行最后一步时一切正常

make install

但有时不是。然后输出说

[root@VMFedora17 Downloads]# make install
make[1]: Entering directory `/home/sven/Downloads'
make[1]: Leaving directory `/home/sven/Downloads'
make[1]: Entering directory `/home/sven/Downloads'
make pre-install-local-hook prefix=/usr/local
make[2]: Entering directory `/home/sven/Downloads'
make[2]: Leaving directory `/home/sven/Downloads'
make install-satellite-assemblies prefix=/usr/local
make[2]: Entering directory `/home/sven/Downloads'
mkdir -p '/usr/local/lib'
cp   bin/Release /usr/local/lib/AudioCuesheetEditor
cp: omitting directory `bin/Release'
make[2]: *** [/usr/local/lib/AudioCuesheetEditor] Error 1
make[2]: Leaving directory `/home/sven/Downloads'
make[1]: *** [install-local] Error 2
make[1]: Leaving directory `/home/sven/Downloads'
make: *** [install-recursive] Error 1

这是在安装了 KDE 的 Fedora 17 Linux 上运行的。在另一个 Fedora 17 KDE 上,一切都很完美。

有人可以帮助我,错误在哪里?

Makefile 可以在这里找到:http: //sourceforge.net/p/audiocuesheet/code/140/tree/trunk/Quellcode/AudioCuesheetEditor.make

谢谢你的帮助!

4

1 回答 1

0

从您的输出和您提供的链接中,我在以下代码段中发现了错误:

install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
    make pre-install-local-hook prefix=$(prefix)
    make install-satellite-assemblies prefix=$(prefix)
    mkdir -p '$(DESTDIR)$(libdir)/$(PACKAGE)'
    $(call cp,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))

我猜 $(ASSEMBLY) 是一个目录,但我不确定。不带参数 -r的命令cp不会递归复制目录。你可以尝试修改

$(call cp,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))

$(call cp,-r,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))

或者

cp -r $(ASSEMBLY) $(DESTDIR)$(libdir)/$(PACKAGE)

此外,如果您想了解为什么原件可以在一台机器上运行但不能在另一台机器上运行,您可以添加一个命令:

echo $(ASSEMBLY)

在上述命令之前查看它们在不同机器上的输出是否不同。

于 2013-01-02T08:58:54.790 回答