Skip to content

Commit 43f678d

Browse files
committed
build: refactor Makefile
Use a single one with dynamically generated rules instead of individual makefiles which are 99% boilerplate.
1 parent b00f92a commit 43f678d

File tree

9 files changed

+6
-35
lines changed

9 files changed

+6
-35
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ JITSI_BUILD ?= latest
44
JITSI_REPO ?= jitsi
55
JITSI_SERVICES ?= base base-java web prosody jicofo jvb jigasi jibri
66

7-
BUILD_ARGS := --build-arg JITSI_REPO=$(JITSI_REPO)
7+
BUILD_ARGS := --build-arg JITSI_REPO=$(JITSI_REPO) --build-arg JITSI_RELEASE=$(JITSI_RELEASE)
88
ifeq ($(FORCE_REBUILD), 1)
99
BUILD_ARGS := $(BUILD_ARGS) --no-cache
1010
endif
@@ -15,7 +15,10 @@ all: build-all
1515
release: tag-all push-all
1616

1717
build:
18-
$(MAKE) BUILD_ARGS="$(BUILD_ARGS)" JITSI_REPO="$(JITSI_REPO)" JITSI_RELEASE="$(JITSI_RELEASE)" -C $(JITSI_SERVICE) build
18+
docker build $(BUILD_ARGS) --progress plain --tag $(JITSI_REPO)/$(JITSI_SERVICE) $(JITSI_SERVICE)/
19+
20+
$(addprefix build_,$(JITSI_SERVICES)):
21+
$(MAKE) --no-print-directory JITSI_SERVICE=$(patsubst build_%,%,$@) build
1922

2023
tag:
2124
docker tag $(JITSI_REPO)/$(JITSI_SERVICE):latest $(JITSI_REPO)/$(JITSI_SERVICE):$(JITSI_BUILD)
@@ -36,4 +39,4 @@ prepare:
3639
docker pull debian:buster-slim
3740
FORCE_REBUILD=1 $(MAKE)
3841

39-
.PHONY: all build tag push clean prepare release
42+
.PHONY: all build tag push clean prepare release $(addprefix build_,$(JITSI_SERVICES))

base-java/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

base/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

jibri/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

jicofo/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

jigasi/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

jvb/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

prosody/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

web/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)