-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (57 loc) · 1.99 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# The name of the extension.
extension_name := feedreco
# The UUID of the extension.
extension_uuid := [email protected]
# The name of the profile dir where the extension can be installed.
profile_dir := 0jbej4kk.Developer
# 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).xpi
# The type of operating system this make command is running on.
#os_type := $(patsubst darwin%,darwin,$(shell echo $(OSTYPE)))
os_type := linux-gnu
# The location of the extension profile.
profile_location := \
~/.mozilla/firefox/$(profile_dir)/extensions/[email protected]
# The temporary location where the extension tree will be copied and built.
build_dir := $(bin_dir)
# 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) \
$(wildcard modules/*.js)
# 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)
@make all
@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!"