Skip to content

Commit 7819592

Browse files
committed
fix(Makefile): build_bin=1 make extra is invalid
1 parent 5860127 commit 7819592

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
*~
2-
/output/
3-
/[-_[:alnum:]]*/
4-
!/plum
5-
!/scripts/
2+
/output
3+
brise-*.tar.gz

Makefile

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
11
ifeq ($(SRCDIR),)
2-
SRCDIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
2+
SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
33
endif
44

55
# Tips: you can set OUTPUT to Rime user directory in the command line
66
ifeq ($(OUTPUT),)
7-
OUTPUT:=$(SRCDIR)/output
7+
OUTPUT := $(SRCDIR)/output
88
endif
99

1010
ifeq ($(PREFIX),)
11-
PREFIX=/usr
11+
PREFIX := /usr
1212
endif
1313

1414
ifeq ($(RIME_DATA_DIR),)
15-
RIME_DATA_DIR=$(PREFIX)/share/rime-data
15+
RIME_DATA_DIR := $(PREFIX)/share/rime-data
1616
endif
1717

18+
# `build_bin=1 make` would build binaries for input schemas enabled by default.
19+
# Note this doesn't work for `extra`, because non of the extra input schemas are
20+
# enabled by default.
1821
all preset extra minimal:
19-
no_update=1 $(MAKE) -C plum OUTPUT=$(OUTPUT) $(@) build
22+
no_update=1 $(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)$${build_bin:+-bin}
2023

21-
build install clean:
24+
install clean:
2225
$(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)
2326

24-
tarball:
27+
VERSION = $(shell date "+%Y%m%d")
28+
29+
dist:
2530
git submodule update --init
2631
$(MAKE) -C plum OUTPUT=$(OUTPUT) all
27-
tar czvf brise-all.tar.gz --exclude=.git --exclude=output -C .. brise
32+
tar czf brise-$(VERSION).tar.gz \
33+
--exclude=.git \
34+
--exclude=output \
35+
--exclude='brise-*.tar.gz' \
36+
-C .. brise
2837

29-
.PHONY: all preset extra minimal build install clean tarball
38+
.PHONY: all preset extra minimal install clean dist

plum

0 commit comments

Comments
 (0)