forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.36 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.36 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
all: package-generic-unix
@:
# --------------------------------------------------------------------
# Packaging.
# --------------------------------------------------------------------
.PHONY: package-generic-unix \
docker-image \
docker-image-push
PACKAGES_DIR ?= ../PACKAGES
SOURCE_DIST_FILE ?= $(wildcard $(PACKAGES_DIR)/rabbitmq-server-*.tar.xz)
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
ifeq ($(SOURCE_DIST_FILE),)
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
endif
ifneq ($(words $(SOURCE_DIST_FILE)),1)
$(error Multiple source archives found; please specify SOURCE_DIST_FILE)
endif
ifeq ($(filter %.tar.xz %.txz,$(SOURCE_DIST_FILE)),)
$(error The source archive must a tar.xz archive)
endif
ifeq ($(wildcard $(SOURCE_DIST_FILE)),)
$(error The source archive must exist)
endif
endif
ifndef NO_CLEAN
DO_CLEAN := clean
endif
VARS = SOURCE_DIST_FILE="$(abspath $(SOURCE_DIST_FILE))" \
PACKAGES_DIR="$(abspath $(PACKAGES_DIR))" \
SIGNING_KEY="$(SIGNING_KEY)"
package-generic-unix: $(SOURCE_DIST_FILE)
$(gen_verbose) $(MAKE) -C generic-unix $(VARS) all $(DO_CLEAN)
docker-image:
$(gen_verbose) $(MAKE) -C docker-image $(VARS) all $(DO_CLEAN)
docker-image-push:
$(gen_verbose) $(MAKE) -C docker-image $(VARS) push $(DO_CLEAN)
.PHONY: clean
clean:
for subdir in generic-unix docker-image; do \
$(MAKE) -C "$$subdir" clean; \
done