blob: 6b9f2f733b70fe7e9dc4cf95737f08c012c9dd8f (
plain)
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
|
ERROR_NO_ARGUMENT = $(error Must pass at least one argument)
.phony: err
err:
$(ERROR_NO_ARGUMENT)
BUILD_DIR = build
SRC_MAKE_CALL = $(MAKE) -f src/Makefile BUILD_DIR=$(BUILD_DIR) NO_CSS=$(NO_CSS)
ifdef LOCALE
SRC_MAKE_CALL += LOCALE=$(LOCALE)
endif
ifdef VERSION
SRC_MAKE_CALL += VERSION=$(VERSION)
endif
# For this target, only archive docsets that have already been built in BUILD_DIR
.phony: archive
archive: $(foreach docset,$(wildcard $(BUILD_DIR)/*.docset),$(basename $(docset)).tgz)
# For this target, simply remove all docsets and tgz files from BUILD_DIR
.phony: clean
clean:
rm -rf $(BUILD_DIR)/*.docset $(BUILD_DIR)/*.tgz
# All supported docsets should be listed here
SUPPORTED_TARGETS = \
debmake \
flex \
GNU_Autoconf \
GNU_Autoconf_Archive \
GNU_Make
.phony: $(SUPPORTED_TARGETS)
$(SUPPORTED_TARGETS):
$(SRC_MAKE_CALL) DOCSET_NAME=$@
$(BUILD_DIR)/%.tgz: $(BUILD_DIR)/%.docset
tar --exclude='.DS_Store' -czf $@ $(basename $@).docset
|