File: Makefile

package info (click to toggle)
brise 0.38.20210909-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 26,344 kB
  • sloc: sh: 577; makefile: 81
file content (38 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (4)
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
ifeq ($(SRCDIR),)
	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
endif

ifeq ($(PREFIX),)
	PREFIX := /usr
endif

ifeq ($(RIME_DATA_DIR),)
	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:
	$(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)$${build_bin:+-bin}

install clean:
	$(MAKE) -C plum OUTPUT=$(OUTPUT) $(@)

VERSION = $(shell date "+%Y%m%d")

dist:
	git submodule update --init
	$(MAKE) -C plum OUTPUT=$(OUTPUT) all
	tar czf brise-$(VERSION).tar.gz \
	  --exclude=.git \
	  --exclude=output \
	  --exclude='brise-*.tar.gz' \
	  -C .. brise

.PHONY: all preset extra minimal install clean dist