-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
40 lines (32 loc) · 1.16 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
outfile = Perspectives.xpi
buildfolder = build
unittest_file = test.html
unittest_source = test/$(unittest_file)
unittest_dest_folder = $(buildfolder)/chrome/content/test
unittest_dest = $(unittest_dest_folder)/$(unittest_file)
.PHONY: plugin
plugin: clean loctests setup
sh -c "cd $(buildfolder)/ && zip -q -r ../$(outfile) * -x *\.svn*"
rm -rf $(buildfolder)
test: clean setup install-test-files plugin
clean:
rm -f $(outfile)
rm -rf $(buildfolder)/
loctests:
@# ensure localization files are valid.
@# note: the next few lines use spaces instead of tabs for indentation
@# just to keep them nicely formatted with the actual commands
ifeq ($(shell command -v python ; echo $$?),1)
@echo -e " python not installed; skipping localization tests.\n WARNING: Invalid localization files may prevent Perspectives from working.\n Install python to enable localization validation."
else
python test/extlib/checkloc.py plugin
endif
setup:
rm -rf $(buildfolder)/
mkdir $(buildfolder)
cp -r plugin/* $(buildfolder)/
install-test-files: setup
mkdir $(unittest_dest_folder)
cp $(unittest_source) $(unittest_dest)
install-fx: plugin
firefox $(outfile)&