]>
Commit | Line | Data |
---|---|---|
2ca993e8 A |
1 | ## Makefile for rebuilding 'unsafe backward' data |
2 | ## Copyright (c) 2015, International Business Machines Corporation and | |
3 | ## others. All Rights Reserved. | |
4 | ||
5 | ## | |
6 | ## CONFIGURATION: | |
7 | ## 1. create Makefile.local containing overrides if necessary: | |
8 | ## BUILD_ROOT=/home/user/icu-build (location of 'config.status' etc.) | |
9 | ## PATH_VAR=DYLD_LIBRARY_PATH (if on OSX etc) | |
10 | ## | |
11 | ## UPDATING | |
12 | ## 1. make 'reset-icu' will reset ICU to 'bootstrap' state, zeroing out source/i18n/collunsafe.h | |
13 | ## 2. make 'gen-file' will generate and test source/i18n/collunsafe.h | |
14 | ||
15 | subdir=tools/gencolusb | |
16 | srcdir=$(shell pwd) | |
17 | SOURCE_ROOT=$(shell cd ../.. ; pwd) | |
18 | BUILD_ROOT=$(SOURCE_ROOT) | |
19 | BUILD_HERE=$(BUILD_ROOT)/$(subdir) | |
20 | TOOL=extract_unsafe_backwards | |
21 | TEST=verify_uset | |
22 | PATH_VAR=LD_LIBRARY_PATH | |
23 | ||
24 | -include Makefile.local | |
25 | ||
26 | GEN_FILE=$(SOURCE_ROOT)/i18n/collunsafe.h | |
27 | BUILD_OPTS=-I$(SOURCE_ROOT)/common -I$(SOURCE_ROOT)/i18n -L$(BUILD_ROOT)/lib -licuuc -licui18n -licudata | |
28 | RUN_OPTS=env $(PATH_VAR)=$(BUILD_ROOT)/lib | |
29 | ||
30 | reset-icu: | |
31 | >$(GEN_FILE) | |
32 | $(MAKE) -C $(BUILD_ROOT)/i18n | |
33 | ||
34 | gen-file: reset-icu | |
35 | mkdir -p $(BUILD_HERE) | |
36 | $(CXX) -o $(BUILD_HERE)/$(TOOL) $(srcdir)/$(TOOL).cpp $(BUILD_OPTS) | |
37 | $(RUN_OPTS) $(BUILD_HERE)/$(TOOL) > $(GEN_FILE) || exit 1 | |
38 | $(CXX) -o $(BUILD_HERE)/$(TEST) $(srcdir)/$(TEST).cpp $(BUILD_OPTS) | |
39 | $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1 | |
40 | $(MAKE) -C $(BUILD_ROOT)/i18n | |
41 | $(RUN_OPTS) $(BUILD_HERE)/$(TEST) || exit 1 | |
42 | ||
43 | .PHONY: reset-icu gen-file |