Files
AdGuardHome/Makefile
Ildar Kamalov be27c06481 Pull request 2452: ADG-10295 add encryption settings page
Squashed commit of the following:

commit e841e3a0b4
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 26 15:49:58 2025 +0300

    fix todo

commit cf251e209b
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 26 15:48:31 2025 +0300

    fix lint issue

commit c47e8216ec
Merge: f754d7cd9 0e3692f9a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 26 15:38:36 2025 +0300

    Merge branch 'ADG-10291' into ADG-10295

commit f754d7cd97
Merge: d56ea7d8a febcc6814
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Aug 22 18:26:15 2025 +0300

    Merge branch 'ADG-10291' into ADG-10295

commit d56ea7d8a6
Author: Ildar Kamalov <ik@adguard.com>
Date:   Thu Aug 21 16:34:47 2025 +0300

    fix form validation

commit a5fee78963
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Aug 20 17:59:53 2025 +0300

    fix form

commit a2da460426
Merge: cff3f4588 ebfa5230a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Aug 15 17:30:28 2025 +0300

    Merge branch 'ADG-10291' into ADG-10295

commit cff3f45883
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Aug 13 19:28:46 2025 +0300

    ADG-10295 add encryption settings page

commit 3f6d759b7f
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 12 16:40:31 2025 +0300

    fix placeholder

commit 507631ab71
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 12 16:15:57 2025 +0300

    use batch

commit e495a5585c
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 12 16:13:13 2025 +0300

    review fix

commit 2ba671b408
Author: Ildar Kamalov <ik@adguard.com>
Date:   Tue Aug 12 10:45:00 2025 +0300

    fix

commit 6f696238a0
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 18:38:28 2025 +0300

    fix language change

commit 8206f3f885
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 14:54:58 2025 +0300

    fix custom radio

commit 0920a51c4a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 14:30:26 2025 +0300

    fix

commit c7ca1e8eaf
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 14:25:16 2025 +0300

    fix ids

commit 7ecd6426d9
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 13:56:29 2025 +0300

    fix constant import

commit 246f1277b8
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 13:46:11 2025 +0300

    fix version

commit 0224f567e6
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 13:34:29 2025 +0300

    fix version

commit 75c9caffbd
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 13:14:01 2025 +0300

    lint fix

commit d0cf6ad5ab
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 12:40:49 2025 +0300

    lint fix

commit 87eb68e519
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 12:06:35 2025 +0300

    use npm

commit 7df7d60ec9
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 11:23:00 2025 +0300

    rm unused

commit c285ea978a
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 10:42:39 2025 +0300

    fix

commit d00f1e12b3
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Aug 11 09:43:35 2025 +0300

    fix

... and 2 more commits
2025-08-26 16:01:14 +03:00

143 lines
4.9 KiB
Makefile

# Keep the Makefile POSIX-compliant. We currently allow hyphens in
# target names, but that may change in the future.
#
# See https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html.
.POSIX:
# This comment is used to simplify checking local copies of the
# Makefile. Bump this number every time a significant change is made to
# this Makefile.
#
# AdGuard-Project-Version: 9
# Don't name these macros "GO" etc., because GNU Make apparently makes
# them exported environment variables with the literal value of
# "${GO:-go}" and so on, which is not what we need. Use a dot in the
# name to make sure that users don't have an environment variable with
# the same name.
#
# See https://unix.stackexchange.com/q/646255/105635.
GO.MACRO = $${GO:-go}
VERBOSE.MACRO = $${VERBOSE:-0}
CHANNEL = development
# TODO(ik): Update CLIENT_DIR to client_v2 for new frontend migration
CLIENT_DIR = client
DEPLOY_SCRIPT_PATH = not/a/real/path
DIST_DIR = dist
GOAMD64 = v1
GOPROXY = https://proxy.golang.org|direct
GOTELEMETRY = off
GOTOOLCHAIN = go1.24.6
GPG_KEY = devteam@adguard.com
GPG_KEY_PASSPHRASE = not-a-real-password
NPM = npm
NPM_FLAGS = --prefix $(CLIENT_DIR)
NPM_INSTALL_FLAGS = $(NPM_FLAGS) --quiet --no-progress
RACE = 0
REVISION = $${REVISION:-$$(git rev-parse --short HEAD)}
SIGN = 1
SIGNER_API_KEY = not-a-real-key
VERSION = v0.0.0
NEXTAPI = 0
# Macros for the build-release target. If FRONTEND_PREBUILT is 0, the
# default, the macro $(BUILD_RELEASE_DEPS_$(FRONTEND_PREBUILT)) expands
# into BUILD_RELEASE_DEPS_0, and so both frontend and backend
# dependencies are fetched and the frontend is built. Otherwise, if
# FRONTEND_PREBUILT is 1, only backend dependencies are fetched and the
# frontend isn't rebuilt.
#
# TODO(a.garipov): We could probably do that from .../build-release.sh,
# but that would mean either calling make from inside make or
# duplicating commands in two places, both of which don't seem to me
# like nice solutions.
FRONTEND_PREBUILT = 0
BUILD_RELEASE_DEPS_0 = deps js-build
BUILD_RELEASE_DEPS_1 = go-deps
ENV = env\
CHANNEL='$(CHANNEL)'\
DEPLOY_SCRIPT_PATH='$(DEPLOY_SCRIPT_PATH)' \
DIST_DIR='$(DIST_DIR)'\
GO="$(GO.MACRO)"\
GOAMD64='$(GOAMD64)'\
GOPROXY='$(GOPROXY)'\
GOTELEMETRY='$(GOTELEMETRY)'\
GOTOOLCHAIN='$(GOTOOLCHAIN)'\
GPG_KEY='$(GPG_KEY)'\
GPG_KEY_PASSPHRASE='$(GPG_KEY_PASSPHRASE)'\
NEXTAPI='$(NEXTAPI)'\
PATH="$${PWD}/bin:$$( "$(GO.MACRO)" env GOPATH )/bin:$${PATH}"\
RACE='$(RACE)'\
REVISION='$(REVISION)'\
SIGN='$(SIGN)'\
SIGNER_API_KEY='$(SIGNER_API_KEY)' \
VERBOSE="$(VERBOSE.MACRO)"\
VERSION="$(VERSION)"\
# Keep the line above blank.
ENV_MISC = env\
PATH="$${PWD}/bin:$$("$(GO.MACRO)" env GOPATH)/bin:$${PATH}"\
VERBOSE="$(VERBOSE.MACRO)"\
# Keep the line above blank.
# Keep this target first, so that a naked make invocation triggers a
# full build.
build: deps quick-build
init: ; git config core.hooksPath ./scripts/hooks
quick-build: js-build go-build
deps: js-deps go-deps
lint: js-lint go-lint
test: js-test go-test
# Here and below, keep $(SHELL) in quotes, because on Windows this will
# expand to something like "C:/Program Files/Git/usr/bin/sh.exe".
build-docker: ; $(ENV) "$(SHELL)" ./scripts/make/build-docker.sh
build-release: $(BUILD_RELEASE_DEPS_$(FRONTEND_PREBUILT))
$(ENV) "$(SHELL)" ./scripts/make/build-release.sh
js-build: ; $(NPM) $(NPM_FLAGS) run build-prod
js-deps: ; $(NPM) $(NPM_INSTALL_FLAGS) ci
js-typecheck: ; $(NPM) $(NPM_FLAGS) run typecheck
js-lint: ; $(NPM) $(NPM_FLAGS) run lint
js-test: ; $(NPM) $(NPM_FLAGS) run test
js-test-e2e: ; $(NPM) $(NPM_FLAGS) run test:e2e
go-bench: ; $(ENV) "$(SHELL)" ./scripts/make/go-bench.sh
go-build: ; $(ENV) "$(SHELL)" ./scripts/make/go-build.sh
go-deps: ; $(ENV) "$(SHELL)" ./scripts/make/go-deps.sh
go-env: ; $(ENV) "$(GO.MACRO)" env
go-fuzz: ; $(ENV) "$(SHELL)" ./scripts/make/go-fuzz.sh
go-lint: ; $(ENV) "$(SHELL)" ./scripts/make/go-lint.sh
# TODO(a.garipov): Think about making RACE='1' the default for all
# targets.
go-test: ; $(ENV) RACE='1' "$(SHELL)" ./scripts/make/go-test.sh
go-tools: ; $(ENV) "$(SHELL)" ./scripts/make/go-tools.sh
go-upd-tools: ; $(ENV) "$(SHELL)" ./scripts/make/go-upd-tools.sh
go-check: go-tools go-lint go-test
# A quick check to make sure that all operating systems relevant to the
# development of the project can be typechecked and built successfully.
go-os-check:
$(ENV) GOOS='darwin' "$(GO.MACRO)" vet ./internal/...
$(ENV) GOOS='freebsd' "$(GO.MACRO)" vet ./internal/...
$(ENV) GOOS='openbsd' "$(GO.MACRO)" vet ./internal/...
$(ENV) GOOS='linux' "$(GO.MACRO)" vet ./internal/...
$(ENV) GOOS='windows' "$(GO.MACRO)" vet ./internal/...
txt-lint: ; $(ENV) "$(SHELL)" ./scripts/make/txt-lint.sh
md-lint: ; $(ENV_MISC) "$(SHELL)" ./scripts/make/md-lint.sh
sh-lint: ; $(ENV_MISC) "$(SHELL)" ./scripts/make/sh-lint.sh
# TODO(a.garipov): Re-add openapi-lint.