]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/gencolusb/Makefile
ICU-57163.0.1.tar.gz
[apple/icu.git] / icuSources / tools / gencolusb / Makefile
CommitLineData
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
15subdir=tools/gencolusb
16srcdir=$(shell pwd)
17SOURCE_ROOT=$(shell cd ../.. ; pwd)
18BUILD_ROOT=$(SOURCE_ROOT)
19BUILD_HERE=$(BUILD_ROOT)/$(subdir)
20TOOL=extract_unsafe_backwards
21TEST=verify_uset
22PATH_VAR=LD_LIBRARY_PATH
23
24-include Makefile.local
25
26GEN_FILE=$(SOURCE_ROOT)/i18n/collunsafe.h
27BUILD_OPTS=-I$(SOURCE_ROOT)/common -I$(SOURCE_ROOT)/i18n -L$(BUILD_ROOT)/lib -licuuc -licui18n -licudata
28RUN_OPTS=env $(PATH_VAR)=$(BUILD_ROOT)/lib
29
30reset-icu:
31 >$(GEN_FILE)
32 $(MAKE) -C $(BUILD_ROOT)/i18n
33
34gen-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