Project

General

Profile

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

haketilo / Makefile.in @ ad69f9c8

1
# This file is part of Haketilo
2
#
3
# Copyright (C) 2021, jahoti
4
# Copyright (C) 2021, Wojtek Kosior
5
#
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

    
15
SHELL = /bin/sh
16
VPATH = <<VPATH>>
17

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

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

    
26
# Configuration goes here
27

    
28
# The default target: placed up here
29
default: $(default_target)
30

    
31
.PHONY: mozilla install-mozilla chromium install-chromium \
32
        all all-unpacked default unpacked \
33
        install install-html install-dvi install-pdf install-ps uninstall \
34
        install-strip clean distclean mostlyclean maintainer-clean TAGS info \
35
        dvi html pdf ps dist check installcheck installdirs \
36
	test test-environment
37

    
38
# core files
39
icons/haketilo16.png: icons/haketilo.svg
40
	cd "$(srcdir)" && ./re-generate_icons.sh
41
# Use haketilo16.png as an "index" for all the icon PNGs
42

    
43
# browser-specific targets
44
all: mozilla chromium
45
mozilla: mozilla-build.zip
46
chromium: chromium-build.zip
47

    
48
unpacked: $(default_target)-unpacked
49
all-unpacked: mozilla-unpacked chromium-unpacked
50
%-unpacked: $(extension_files) icons/haketilo16.png
51
	$(srcdir)/build.sh $* $(srcdir) $(UPDATE_URL)
52

    
53
install install-strip: $(default_target)-unpacked
54
	cp -R $(default_target)-unpacked \
55
	"$(DESTDIR)/{6fe13369-88e9-440f-b837-5012fb3bedec}"
56

    
57
uninstall:
58
	rm -r "$(DESTDIR)/{6fe13369-88e9-440f-b837-5012fb3bedec}"
59

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

    
63
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 $(default_target)-build.zip
74
	MOZ_HEADLESS=whatever $(PYTEST)
75

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

    
79
# helper targets
80
clean mostlyclean:
81
	rm -rf mozilla-unpacked chromium-unpacked haketilo-$(version)
82
	rm -f mozilla-build.zip chromium-build.zip haketilo-$(version).tar.gz \
83
	        haketilo-$(version).tar exports_init.js
84
	rm -rf test/certs
85
	rm -rf $$(find . -name geckodriver.log)
86
	rm -rf $$(find . -type d -name __pycache__)
87
	rm -rf $$(find . -type d -name injected_scripts)
88

    
89
distclean: clean
90
	rm -f Makefile config.status record.conf
91

    
92
maintainer-clean: distclean
93
	@echo 'This command is intended for maintainers to use; it'
94
	@echo 'deletes files that may need special tools to rebuild.'
95
	rm -f "$(srcdir)"/icons/*.png
96

    
97
dist: $(extension_files) $(metafiles) icons/haketilo16.png
98
	test -d haketilo-$(version) || mkdir haketilo-$(version)
99
	for file in $(extension_files) $(metafiles) icons/; do \
100
	    cp -R "$(srcdir)"/$$file haketilo-$(version); \
101
	done
102
	tar cf haketilo-$(version).tar haketilo-$(version)
103
	gzip haketilo-$(version).tar
104

    
105
# Files for constructing the makefile
106
Makefile: config.status Makefile.in record.conf
107
	./config.status
108

    
109
config.status: write_makefile.sh
110
	cp "$(srcdir)"/write_makefile.sh config.status
111

    
112
# Unused GNU-specified targets
113
install-html:
114
install-dvi:
115
install-pdf:
116
install-ps:
117
TAGS:
118
info:
119
dvi:
120
html:
121
pdf:
122
ps:
123
check:
124
installcheck:
125
installdirs:
(2-2/16)