-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile_licence
39 lines (31 loc) · 1.81 KB
/
Makefile_licence
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
# FIXME: temporarily split Makefile to parallelise licence info extraction
# once -j can be passed to the toplevel Makefile this should be moved
# back into the main Makefile
all: dist/license/all
LIB_LICENSES := brotli expat freetype fribidi fontconfig harfbuzz libass
LIB_LICENSES_FINDOPT_brotli := -path ./research -prune -false -o
LIB_LICENSES_FINDOPT_expat := -path ./expat/fuzz -prune -false -o
LIB_LICENSES_FINDOPT_freetype := -path ./src/tools -prune -false -o
LIB_LICENSES_FINDOPT_fribidi := -path ./bin -prune -false -o
LIB_LICENSES_FINDOPT_harfbuzz := -path ./test -prune -false -o
$(addprefix dist/license/, $(LIB_LICENSES)): dist/license/%: .git/modules/lib/%/HEAD build/license_extract.sh build/license_defaults
@mkdir -p dist/license
(cd "lib/$*" && FINDOPTS="$(LIB_LICENSES_FINDOPT_$*)" \
../../build/license_extract.sh ../../build/license_defaults "$*" .) > $@
dist/license/jassub: .git/HEAD build/license_extract.sh
@mkdir -p dist/license
build/license_extract.sh build/license_defaults jassub src > dist/license/jassub
dist/license/all: dist/license/jassub $(addprefix dist/license/, $(LIB_LICENSES)) build/license_fullnotice build/license_lint.awk
@echo "# The following lists all copyright notices and licenses for the" > dist/license/all
@echo "# work contained in JASSUB per project." >> dist/license/all
@echo "" >> dist/license/all
@echo "Concatenate extracted license info..."
@$(foreach LIB_PROJ, jassub $(LIB_LICENSES), \
echo "# Project: $(LIB_PROJ)" >> dist/license/all && \
cat dist/license/$(LIB_PROJ) >> dist/license/all && \
) :
mv dist/license/all dist/license/all.tmp
build/license_lint.awk dist/license/all.tmp build/license_fullnotice
cat dist/license/all.tmp build/license_fullnotice > dist/license/all
dist/js/COPYRIGHT: dist/license/all
cp "$<" "$@"