-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 792 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 792 Bytes
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
extension_name := deref
extension_uuid := jgn@cnil.fr
ZIP := zip
bin_dir := ./bin
src_dir := ./src
build_dir := $(bin_dir)/build
xpi_file := $(bin_dir)/$(extension_name).xpi
.PHONY: all
all: $(xpi_file)
@echo
@echo "Build finished successfully."
@echo
.PHONY: clean
clean:
@rm -rf $(build_dir)
@rm -f $(xpi_file)
@echo "Cleanup is done."
xpi_built :=manifest.json \
$(wildcard icons/*.png) \
$(wildcard src/*.html) \
$(wildcard src/*.js)
.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!"