2012-12-27 37 views
1

我目前正在開發一個項目,該項目還應該提供一個要打包到Linux系統中的源代碼包。由於我使用的是monodevelop,我用Makefile安裝目標有時可以正常工作,有時不需要

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

來生成makefile等。但是有一個小問題。在某些系統上,當運行最後一步時,一切正常。

make install 

但有時不。輸出然後說

[[email protected] 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

感謝您的幫助!

+0

沒有人有任何想法嗎?我真的被這個問題困住了,因爲我不知道從哪裏開始尋找問題?! – Sven

回答

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)) 

我猜$(組裝)是一個目錄,但我不知道。沒有參數-r的命令cp不會以遞歸方式複製目錄。你可以嘗試修改

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

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

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

此外,如果你想找出爲什麼一臺機器上的原創作品,但不是在另一個你可以加一條命令:

echo $(ASSEMBLY) 

在上述命令之前查看它們的輸出是否在不同的機器上有所不同。

+0

感謝您的幫助,但沒有奏效。它有時會繼續工作,有時候不會。是的,$(ASSEMBLY)似乎是「bin/Release」,但爲什麼它有時會起作用?我只是不明白,爲什麼它有時會起作用,有時不會(在同一臺機器上)。 – Sven

+0

bin/Release是目錄還是文件?我想這是一個文件。但遇到錯誤時,表示它是一個目錄。 – Like

+0

bin/Release是輸出目錄。 – Sven

相關問題