2014-02-20 76 views
0

我正在通過xulschool教程hereXULSchool make:***沒有規則來製作目標'../bin/build','install'需要。停止

目前爲止一切都很順利,但是我遇到了他們包含的makefile的問題。 「讓」工作正常,但「讓安裝」引發錯誤:

"make: *** No rule to make target '../bin/build', needed by 'install'. Stop." 

我從來沒有使用過化妝,但它看起來像它希望未在本教程中任何地方提到一些額外的參數。任何幫助將不勝感激。

內容makefile文件:

# The name of the extension. 
    extension_name := xulschoolhello 

# The UUID of the extension. 
extension_uuid := [email protected] 

# The name of the profile dir where the extension can be installed. 
profile_dir := XULSchool 

# The zip application to be used. 
ZIP := zip 

# The target location of the build and build files. 
bin_dir := ../bin 

# The target XPI file. 
xpi_file := $(bin_dir)/$(extension_name)2.xpi 

# The type of operating system this make command is running on. 
os_type := $(patsubst darwin%,darwin,$(shell echo $(OSTYPE))) 

# The location of the extension profile. 
ifeq ($(os_type), darwin) 
    profile_location := \ 
    ~/Library/Application\ Support/Firefox/Profiles/$(profile_dir)/extensions/\{$(extension_uuid)\} 
else 
    ifeq ($(os_type), linux-gnu) 
    profile_location := \ 
     ~/.mozilla/firefox/$(profile_dir)/extensions/\{$(extension_uuid)\} 
    else 
    profile_location := \ 
     "$(subst \,\\,$(APPDATA))\\Mozilla\\Firefox\\Profiles\\$(profile_dir)\\extensions\\{$(extension_uuid)}" 
    endif 
endif 

# The temporary location where the extension tree will be copied and built. 
build_dir := $(bin_dir)/build 

# This builds the extension XPI file. 
.PHONY: all 
all: $(xpi_file) 
    @echo 
    @echo "Build finished successfully." 
    @echo 

# This cleans all temporary files and directories created by 'make'. 
.PHONY: clean 
clean: 
    @rm -rf $(build_dir) 
    @rm -f $(xpi_file) 
    @echo "Cleanup is done." 

# The sources for the XPI file. 
xpi_built := install.rdf \ 
      chrome.manifest \ 
      $(wildcard content/*.js) \ 
      $(wildcard content/*.xul) \ 
      $(wildcard content/*.xml) \ 
      $(wildcard content/*.css) \ 
      $(wildcard skin/*.css) \ 
      $(wildcard skin/*.png) \ 
      $(wildcard locale/*/*.dtd) \ 
      $(wildcard locale/*/*.properties) 

# This builds everything except for the actual XPI, and then it copies it to the 
# specified profile directory, allowing a quick update that requires no install. 
.PHONY: install 
install: $(build_dir) $(xpi_built) 
    @echo "Installing in profile folder: $(profile_location)" 
    @cp -Rf $(build_dir)/* $(profile_location) 
    @echo "Installing in profile folder. Done!" 
    @echo 


$(xpi_file): $(xpi_built) 
    @echo "Creating XPI file." 
    @$(ZIP) $(xpi_file) $(xpi_built) 
    @echo "Creating XPI file. Done!" 

回答

0

我遵循相同的教程,並跑進了問題,但我設法得到它的工作通過手動創建(在OSX)以下文件夾:

~/Library/Application Support/Firefox/Profiles/xulschool-dev/extensions/{[email protected]}

但是,後來我發現文件夾xulschool-dev是通過使用該確切名稱設置新的Firefox配置文件創建的。

+0

嗯,我得到了相同的問題(win7 x64),但創建配置文件,因此創建該目錄並沒有解決它對我來說。 – user2345998

0

我解決我的Mac上這個問題通過分配:

profile_location := \ 
~/Library/Application\ Support/Firefox/Profiles/$(profile_dir)/extensions/\{$(extension_uuid)\} 

因爲出於某種原因else(26行)語句在Mac上執行。

在此之前,需要創建$(profile_dir)。如何創建它被解釋爲here

另外:中

build_dir := $(bin_dir) 

代替

build_dir := $(bin_dir)/build 

他們開始之後。

但命令make clean將得到壞了,來修復它:

@rm -rf $(build_dir)/bin 

代替:

@rm -rf $(build_dir) 

最終的結果是在這裏: https://jsfiddle.net/bhjbfc0t/1/

相關問題