mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 18:32:45 +01:00
8bb44242bd
This is a replacement for the dubious approach when the extension itself was used to run benchmarks to detect performance and filtering behavior regressions.
68 lines
1.6 KiB
Makefile
68 lines
1.6 KiB
Makefile
# https://stackoverflow.com/a/6273809
|
|
run_options := $(filter-out $@,$(MAKECMDGOALS))
|
|
|
|
.PHONY: all clean test lint chromium firefox npm dig \
|
|
compare maxcost mincost record wasm
|
|
|
|
sources := $(wildcard src/* src/*/* src/*/*/* src/*/*/*/*)
|
|
platform := $(wildcard platform/* platform/*/*)
|
|
assets := $(wildcard submodules/uAssets/* \
|
|
submodules/uAssets/*/* \
|
|
submodules/uAssets/*/*/* \
|
|
submodules/uAssets/*/*/*/*)
|
|
|
|
all: chromium firefox npm
|
|
|
|
dist/build/uBlock0.chromium: tools/make-chromium.sh $(sources) $(platform) $(assets)
|
|
tools/make-chromium.sh
|
|
|
|
# Build the extension for Chromium.
|
|
chromium: dist/build/uBlock0.chromium
|
|
|
|
dist/build/uBlock0.firefox: tools/make-firefox.sh $(sources) $(platform) $(assets)
|
|
tools/make-firefox.sh all
|
|
|
|
# Build the extension for Firefox.
|
|
firefox: dist/build/uBlock0.firefox
|
|
|
|
dist/build/uBlock0.npm: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
|
tools/make-npm.sh
|
|
|
|
# Build the Node.js package.
|
|
npm: dist/build/uBlock0.npm
|
|
|
|
lint: npm
|
|
cd dist/build/uBlock0.npm && npm install && npm run lint
|
|
|
|
test: npm
|
|
cd dist/build/uBlock0.npm && npm install && npm run test
|
|
|
|
dist/build/uBlock0.dig: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
|
tools/make-dig.sh
|
|
|
|
dig: dist/build/uBlock0.dig
|
|
cd dist/build/uBlock0.dig && npm install
|
|
|
|
dig-snfe: dig
|
|
cd dist/build/uBlock0.dig && npm run snfe $(run_options)
|
|
|
|
# Update submodules.
|
|
update-submodules:
|
|
tools/update-submodules.sh
|
|
|
|
clean:
|
|
rm -rf dist/build
|
|
|
|
|
|
# Not real targets, just convenient for auto-completion at shell prompt
|
|
compare:
|
|
@echo
|
|
maxcost:
|
|
@echo
|
|
mincost:
|
|
@echo
|
|
record:
|
|
@echo
|
|
wasm:
|
|
@echo
|