diff --git a/.gitignore b/.gitignore index 04b2048..c11e052 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ *~ -/output/ -/[-_[:alnum:]]*/ -!/plum -!/scripts/ +/output +brise-*.tar.gz \ No newline at end of file diff --git a/Makefile b/Makefile index 9476176..9193229 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,38 @@ ifeq ($(SRCDIR),) - SRCDIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) endif # Tips: you can set OUTPUT to Rime user directory in the command line ifeq ($(OUTPUT),) - OUTPUT:=$(SRCDIR)/output + OUTPUT := $(SRCDIR)/output endif ifeq ($(PREFIX),) - PREFIX=/usr + PREFIX := /usr endif ifeq ($(RIME_DATA_DIR),) - RIME_DATA_DIR=$(PREFIX)/share/rime-data + RIME_DATA_DIR := $(PREFIX)/share/rime-data endif +# `build_bin=1 make` would build binaries for input schemas enabled by default. +# Note this doesn't work for `extra`, because non of the extra input schemas are +# enabled by default. all preset extra minimal: - no_update=1 $(MAKE) -C plum OUTPUT=$(OUTPUT) $(@) build + no_update=1 $(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)$${build_bin:+-bin} -build install clean: +install clean: $(MAKE) -C plum OUTPUT=$(OUTPUT) $(@) -tarball: +VERSION = $(shell date "+%Y%m%d") + +dist: git submodule update --init $(MAKE) -C plum OUTPUT=$(OUTPUT) all - tar czvf brise-all.tar.gz --exclude=.git --exclude=output -C .. brise + tar czf brise-$(VERSION).tar.gz \ + --exclude=.git \ + --exclude=output \ + --exclude='brise-*.tar.gz' \ + -C .. brise -.PHONY: all preset extra minimal build install clean tarball +.PHONY: all preset extra minimal install clean dist diff --git a/plum b/plum index 895b485..b1097e1 160000 --- a/plum +++ b/plum @@ -1 +1 @@ -Subproject commit 895b485022271603330e4be803e3c56800737090 +Subproject commit b1097e1bbc7cfe50e94c99310ad4395a784759bf