Project

General

Profile

« Previous | Next » 

Revision 7965f1b4

Added by koszko over 1 year ago

improve the build system

View differences:

Makefile.in
16 16
VPATH = <<VPATH>>
17 17

  
18 18
version = <<VERSION>>
19
PYTEST = <<PYTEST>>
20 19
extension_files = background/ common/ content/ html/ licenses/ \
21 20
        copyright default_settings.json manifest.json
22 21

  
23 22
metafiles = build.sh configure Makefile.in process_html_file.sh README.txt \
24 23
        re-generate_icons.sh shell_utils.sh upload_amo.sh write_makefile.sh
25 24

  
26
# Configuration goes here
25
# Configuration gets included here by write_makefile.sh
27 26

  
28 27
# The default target: placed up here
29 28
default: $(default_target)
......
45 44
mozilla: mozilla-build.zip
46 45
chromium: chromium-build.zip
47 46

  
48
unpacked: $(default_target)-unpacked
47
unpacked: $(default_target)-unpacked Makefile
49 48
all-unpacked: mozilla-unpacked chromium-unpacked
50 49
%-unpacked: $(extension_files) icons/haketilo16.png
51 50
	$(srcdir)/build.sh $* $(srcdir) $(UPDATE_URL)
......
57 56
uninstall:
58 57
	rm -r "$(DESTDIR)/{6fe13369-88e9-440f-b837-5012fb3bedec}"
59 58

  
60
%-build.zip: %-unpacked
59
%-build.zip: %-unpacked Makefile
61 60
	cd $< && zip -q -r ../$@ *
62 61

  
63
test/certs/:
62
test/:
63
	mkdir $@
64

  
65
test/certs/: | test/
64 66
	mkdir $@
65 67

  
66 68
test/certs/%.key: | test/certs/
......
71 73
		 -subj "/CN=Haketilo Test"
72 74

  
73 75
test: test/certs/rootCA.pem test/certs/site.key $(default_target)-build.zip
74
	MOZ_HEADLESS=whatever $(PYTEST)
76
	MOZ_HEADLESS=whatever $(PYTHON) -m pytest
75 77

  
76 78
test-environment: test/certs/rootCA.pem test/certs/site.key
77 79
	python3 -m test
......
82 84

  
83 85
# helper targets
84 86
clean mostlyclean:
85
	rm -rf mozilla-unpacked chromium-unpacked haketilo-$(version)
86
	rm -f mozilla-build.zip chromium-build.zip haketilo-$(version).tar.gz \
87
	        haketilo-$(version).tar exports_init.js
87
	rm -rf mozilla-unpacked chromium-unpacked haketilo-[1-9]*
88
	rm -f mozilla-build.zip chromium-build.zip exports_init.js
88 89
	rm -rf test/certs
89 90
	rm -rf $$(find . -name geckodriver.log)
90 91
	rm -rf $$(find . -type d -name __pycache__)

Also available in: Unified diff