Skip to content

Commit

Permalink
fix(Makefile): build_bin=1 make extra is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed May 12, 2018
1 parent 5860127 commit 7819592
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
*~
/output/
/[-_[:alnum:]]*/
!/plum
!/scripts/
/output
brise-*.tar.gz
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion plum
Submodule plum updated 3 files
+2 −1 .gitignore
+31 −8 Makefile
+3 −3 README.md

0 comments on commit 7819592

Please sign in to comment.