Project

General

Profile

Download (3.79 KB) Statistics
| Branch: | Tag: | Revision:

haketilo / Makefile.in @ 215ca720

1 5285b092 jahoti
# This file is part of Haketilo
2 95b040ff jahoti
#
3 4320edc9 jahoti
# Copyright (C) 2021, jahoti
4 5b2a7a61 Wojtek Kosior
# Copyright (C) 2021, Wojtek Kosior
5 5285b092 jahoti
#
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the CC0 1.0 Universal License as published by
8
# the Creative Commons Corporation.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# CC0 1.0 Universal License for more details.
14 95b040ff jahoti
15
SHELL = /bin/sh
16 e0c94ac4 jahoti
VPATH = <<VPATH>>
17 564cb260 jahoti
18
version = <<VERSION>>
19 ee53045f jahoti
extension_files = background/ common/ content/ html/ licenses/ \
20 bd767301 Wojtek Kosior
        copyright default_settings.json manifest.json
21 ee53045f jahoti
22
metafiles = build.sh configure Makefile.in process_html_file.sh README.txt \
23
        re-generate_icons.sh shell_utils.sh upload_amo.sh write_makefile.sh
24 4320edc9 jahoti
25
# Configuration goes here
26 95b040ff jahoti
27
# The default target: placed up here
28
default: $(default_target)
29
30 fa5a0e79 jahoti
.PHONY: mozilla install-mozilla chromium install-chromium \
31
        all all-unpacked default unpacked \
32 ee53045f jahoti
        install install-html install-dvi install-pdf install-ps uninstall \
33
        install-strip clean distclean mostlyclean maintainer-clean TAGS info \
34 5b2a7a61 Wojtek Kosior
        dvi html pdf ps dist check installcheck installdirs \
35
	test test-environment
36 ee53045f jahoti
37
# core files
38
icons/haketilo16.png: icons/haketilo.svg
39
	cd "$(srcdir)" && ./re-generate_icons.sh
40
# Use haketilo16.png as an "index" for all the icon PNGs
41 95b040ff jahoti
42 ee53045f jahoti
# browser-specific targets
43 95b040ff jahoti
all: mozilla chromium
44 ef5ae649 jahoti
mozilla: mozilla-build.zip
45
chromium: chromium-build.zip
46 95b040ff jahoti
47 ef5ae649 jahoti
unpacked: $(default_target)-unpacked
48
all-unpacked: mozilla-unpacked chromium-unpacked
49
%-unpacked: $(extension_files) icons/haketilo16.png
50 95b040ff jahoti
	$(srcdir)/build.sh $* $(srcdir) $(UPDATE_URL)
51
52 fa5a0e79 jahoti
install install-strip: $(default_target)-unpacked
53
	cp -R $(default_target)-unpacked \
54
	"$(DESTDIR)/{6fe13369-88e9-440f-b837-5012fb3bedec}"
55
56
uninstall:
57
	rm -r "$(DESTDIR)/{6fe13369-88e9-440f-b837-5012fb3bedec}"
58
59 ef5ae649 jahoti
%-build.zip: %-unpacked
60 95b040ff jahoti
	cd $< && zip -q -r ../$@ *
61
62 215ca720 jahoti
# testing-related targets
63 5b2a7a61 Wojtek Kosior
test/certs/:
64
	mkdir $@
65
66
test/certs/%.key: | test/certs/
67
	openssl genrsa -out $@ 2048
68
69
test/certs/rootCA.pem: test/certs/rootCA.key
70
	openssl req -x509 -new -nodes -key $< -days 1024 -out $@ \
71
		 -subj "/CN=Haketilo Test"
72
73
test: test/certs/rootCA.pem test/certs/site.key
74 215ca720 jahoti
	@echo 'Warning: if the build directory is not the same'
75
	@echo 'as the source directory, THIS WILL NOT WORK.'
76 3fcff338 jahoti
	MOZ_HEADLESS=whatever $(PYTEST)
77 5b2a7a61 Wojtek Kosior
78
test-environment: test/certs/rootCA.pem test/certs/site.key
79 215ca720 jahoti
	@echo 'Warning: if the build directory is not the same'
80
	@echo 'as the source directory, THIS WILL NOT WORK.'
81 3fcff338 jahoti
	$(PYTHON) -m test
82 fa5a0e79 jahoti
83 215ca720 jahoti
hello: record.conf
84
	@ls
85
86 ee53045f jahoti
# helper targets
87
clean mostlyclean:
88 ef5ae649 jahoti
	rm -rf mozilla-unpacked chromium-unpacked haketilo-$(version)
89
	rm -f mozilla-build.zip chromium-build.zip haketilo-$(version).tar.gz \
90
	        haketilo-$(version).tar
91 5b2a7a61 Wojtek Kosior
	rm -rf test/certs
92
	rm -rf $$(find . -name geckodriver.log)
93
	rm -rf $$(find . -type d -name __pycache__)
94 4320edc9 jahoti
95
distclean: clean
96 3fcff338 jahoti
	rm -f Makefile config.status record.conf testing.conf
97 4320edc9 jahoti
98 ee53045f jahoti
maintainer-clean: distclean
99
	@echo 'This command is intended for maintainers to use; it'
100
	@echo 'deletes files that may need special tools to rebuild.'
101
	rm -f "$(srcdir)"/icons/*.png
102
103
dist: $(extension_files) $(metafiles) icons/haketilo16.png
104
	test -d haketilo-$(version) || mkdir haketilo-$(version)
105
	for file in $(extension_files) $(metafiles) icons/; do \
106
	    cp -R "$(srcdir)"/$$file haketilo-$(version); \
107
	done
108
	tar cf haketilo-$(version).tar haketilo-$(version)
109
	gzip haketilo-$(version).tar
110
111 4320edc9 jahoti
# Files for constructing the makefile
112
Makefile: config.status Makefile.in record.conf
113
	./config.status
114
115 564cb260 jahoti
config.status: write_makefile.sh
116 4320edc9 jahoti
	cp "$(srcdir)"/write_makefile.sh config.status
117 ee53045f jahoti
118
# Unused GNU-specified targets
119
install-html:
120
install-dvi:
121
install-pdf:
122
install-ps:
123
TAGS:
124
info:
125
dvi:
126
html:
127
pdf:
128
ps:
129
check:
130
installcheck:
131
installdirs: