Makefile XULSchool make:**没有规则生成目标'/bin/build';,'所需;安装&x27;。停止

Makefile XULSchool make:**没有规则生成目标'/bin/build';,'所需;安装&x27;。停止,makefile,firefox-addon,Makefile,Firefox Addon,我正在学习xulschool教程 到目前为止,一切都进行得很顺利,但我对其中包含的makefile有问题。“make”工作正常,但“make install”会抛出错误: "make: *** No rule to make target '../bin/build', needed by 'install'. Stop." 我以前从未使用过make,但它似乎需要一些教程中没有提到的额外参数。任何帮助都将不胜感激 生成文件的内容: # The name of the extension.

我正在学习xulschool教程

到目前为止,一切都进行得很顺利,但我对其中包含的makefile有问题。“make”工作正常,但“make install”会抛出错误:

"make: *** No rule to make target '../bin/build', needed by 'install'.  Stop."
我以前从未使用过make,但它似乎需要一些教程中没有提到的额外参数。任何帮助都将不胜感激

生成文件的内容:

# The name of the extension.
    extension_name := xulschoolhello

# The UUID of the extension.
extension_uuid := helloworld@xulschool.com

# 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!"

我遵循相同的教程并遇到了问题,但我通过手动创建以下文件夹(在OSX上)成功地解决了问题:

~/Library/Application Support/Firefox/Profiles/xulschool dev/extensions/{helloworld@xulschool.com}


但是,我后来发现,文件夹
xulschool dev
是通过使用该确切名称设置新的Firefox配置文件创建的。

我在Mac上通过分配:

profile_location := \
~/Library/Application\ Support/Firefox/Profiles/$(profile_dir)/extensions/\{$(extension_uuid)\}
因为出于某种原因,
else
(第26行)语句在Mac上执行

在此之前,需要创建
$(profile\u dir)
。解释了如何创建它

此外:

而不是

build_dir := $(bin_dir)/build
就在他们被启动之后

但是命令
makeclean
将被破坏,以修复它:

@rm -rf $(build_dir)/bin
而不是:

@rm -rf $(build_dir)
最终结果如下:

Hm,我也遇到了同样的问题(win7 x64),但创建配置文件并创建目录并没有为我解决这个问题。
@rm -rf $(build_dir)