-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (59 loc) · 2.05 KB
/
Copy pathMakefile
File metadata and controls
71 lines (59 loc) · 2.05 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Makefile - Install en_ID locale
# BCS1212 compliant
PREFIX ?= /usr
LOCALEDIR ?= $(PREFIX)/share/i18n/locales
CHARMAP ?= UTF-8
DESTDIR ?=
.PHONY: all install install-persistent uninstall check test compile clean info help
all: compile
install:
install -d $(DESTDIR)$(LOCALEDIR)
install -m 644 localedata/en_ID $(DESTDIR)$(LOCALEDIR)/en_ID
@if [ -z "$(DESTDIR)" ]; then \
localedef --charmap=$(CHARMAP) --inputfile=$(LOCALEDIR)/en_ID en_ID.$(CHARMAP); \
$(MAKE) --no-print-directory check; \
fi
install-persistent: install
@./ensure-persistence.sh
uninstall:
rm -f $(DESTDIR)$(LOCALEDIR)/en_ID
@if [ -z "$(DESTDIR)" ]; then \
localedef --delete-from-archive en_ID.$(CHARMAP) 2>/dev/null || true; \
localedef --delete-from-archive en_ID.utf8 2>/dev/null || true; \
fi
check:
@if locale -a 2>/dev/null | grep -q en_ID; then \
echo 'en_ID: OK'; \
else \
echo 'en_ID: NOT FOUND (run "locale -a" to verify)' >&2; \
exit 1; \
fi
test: compile
./tests/test_en_ID.sh
compile:
mkdir -p build
localedef -f $(CHARMAP) -i localedata/en_ID ./build/en_ID.$(CHARMAP)
clean:
rm -rf build
info:
@echo 'en_ID locale information:'
@grep -E '^(title|language|territory|revision|date)[[:space:]]' localedata/en_ID
@echo 'charmap: $(CHARMAP)'
help:
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@echo ' (default) Compile locale to build directory'
@echo ' compile Compile locale to build directory'
@echo ' install Install locale system-wide'
@echo ' install-persistent Install + persistence across system updates'
@echo ' uninstall Remove locale from system'
@echo ' check Verify locale is available'
@echo ' test Run test suite'
@echo ' info Display locale information'
@echo ' clean Remove build artifacts'
@echo ' help Show this message'
@echo ''
@echo 'Install from GitHub:'
@echo ' git clone https://github.com/Open-Technology-Foundation/en_ID.git'
@echo ' cd en_ID && sudo make install'