-
Notifications
You must be signed in to change notification settings - Fork 7
/
core.build.mk
39 lines (33 loc) · 1017 Bytes
/
core.build.mk
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
# Adds a 'build' target that will call all the targets in YP_BUILD_TARGETS.
#
# To add another build target do
# YP_BUILD_TARGETS += \
# build-something-else \
#
# ------------------------------------------------------------------------------
#
# Adds a 'dist' target as an extensible alias to 'build', closely following GNU conventions.
#
# To add another dist target do
# YP_DIST_TARGETS += \
# dist-something-else \
#
# ------------------------------------------------------------------------------
YP_BUILD_TARGETS += \
YP_DIST_TARGETS += \
build \
# ------------------------------------------------------------------------------
.PHONY: build
build: ## Build.
[[ "$(words $(YP_BUILD_TARGETS))" = "0" ]] || { \
$(ECHO_DO) "Building..."; \
$(MAKE) --no-print-directory $(YP_BUILD_TARGETS); \
$(ECHO_DONE); \
}
.PHONY: dist
dist:
[[ "$(words $(YP_DIST_TARGETS))" = "0" ]] || { \
$(ECHO_DO) "Packaging a distribution..."; \
$(MAKE) --no-print-directory $(YP_DIST_TARGETS); \
$(ECHO_DONE); \
}