1## Makefile.in for ICU - tools/genrb 2## Copyright (c) 1999-2007, International Business Machines Corporation and 3## others. All Rights Reserved. 4 5# SIMPLIFIED WAY TO BUILD ICU4J DATA FROM C 6# 7# Note: do NOT edit this file, Makefile or Makefile.in 8# Create a new file, Makefile.local 9# 10# 1. Need to set the following variable in Makefile.local: 11# 12# ICU4J_HOME example: ICU4J_HOME=/home/srl/icu4j 13# Path to your icu4j directory. Should contain build.xml 14# If not set, will create a 'icu4j' directory in source/tools/genrb/icu4j 15# 16# 2. The next variable can be set by uncommenting and copying the following line to your Makefile.local.GENDTJAR_JARHOME 17# 18## GENDTJAR_JARHOME:=$(shell dirname `which jar`) 19## (uncomment the above line and copy to Makefile.local) 20# 21# GENDTJAR_JARHOME is the directory containing the 'jar' binary, such as /usr/bin 22# 23# 24# 3. Now, you can run 'make build-icu4j' from icu/source/data (convenience) 25# or icu/source/tools/genrb (this directory) 26 27 28## Source directory information 29srcdir = @srcdir@ 30top_srcdir = @top_srcdir@ 31 32top_builddir = ../.. 33 34include $(top_builddir)/icudefs.mk 35 36## Build directory information 37subdir = tools/genrb 38 39TARGET_STUB_NAME = genrb 40DERB_STUB_NAME = derb 41 42SECTION = 1 43 44MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION) 45 46 47## Extra files to remove for 'make clean' 48CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS) 49 50## Target information 51TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT) 52DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT) 53 54ifneq ($(top_builddir),$(top_srcdir)) 55CPPFLAGS += -I$(top_builddir)/common 56endif 57CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil 58LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) 59 60OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \ 61wrtjava.o rle.o wrtxml.o prscmnts.o 62DERB_OBJ = derb.o 63 64DEPS = $(OBJECTS:.o=.d) 65DERB_DEPS = $(DERB_OBJ:.o=.d) 66 67# build-icu4j variables 68GENDTJAR_ICUHOME=$(shell pwd)/../../.. 69GENDTJAR_OPTS=--icu-root="$(GENDTJAR_ICUHOME)" --jar="$(GENDTJAR_JARHOME)" --icu4j-root="$(ICU4J_HOME)" --verbose 70GENDTJAR_TEMP=./temp/ 71GENDTJAR=$(srcdir)/gendtjar.pl 72 73-include Makefile.local 74 75ifeq (,$(ICU4J_HOME)) 76ICU4J_HOME=$(shell pwd)/icu4j 77endif 78 79 80## List of phony targets 81.PHONY : all all-local install install-local clean clean-local \ 82distclean distclean-local dist dist-local check check-local install-man \ 83build-icu4j 84 85## Clear suffix list 86.SUFFIXES : 87 88## List of standard targets 89all: all-local 90install: install-local 91clean: clean-local 92distclean : distclean-local 93dist: dist-local 94check: all check-local 95 96all-local: $(TARGET) $(DERB) $(MAN_FILES) 97 98install-local: all-local install-man 99 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 100 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir) 101 $(INSTALL) $(DERB) $(DESTDIR)$(bindir) 102 103install-man: $(MAN_FILES) 104 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) 105 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) 106 107dist-local: 108 109clean-local: 110 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) 111 $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP) 112 113distclean-local: clean-local 114 $(RMV) Makefile 115 116check-local: all-local 117 118Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 119 cd $(top_builddir) \ 120 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 121 122$(TARGET) : $(OBJECTS) 123 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 124 $(POST_BUILD_STEP) 125 126$(DERB) : $(DERB_OBJ) 127 $(LINK.c) $(OUTOPT)$@ $^ $(LIBS) 128 $(POST_BUILD_STEP) 129 130$(GENDTJAR_JARHOME)/jar: 131 @echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in 132 exit 1 133 134$(ICU4J_HOME)/build.xml: 135 @echo warning: $@ not found - make sure ICU4J_HOME is set. 136 137build-icu4j: $(GENDTJAR) $(ICU4J_HOME)/build.xml $(GENDTJAR_JARHOME)/jar 138 # clean up old temp files 139 -$(RMV) $(GENDTJAR_TEMP) 140 perl $(GENDTJAR) $(GENDTJAR_OPTS) 141 @echo Finished building to $(ICU4J_HOME) 142 143 144# This line is needed to serialize builds when the gmake -j option is used. 145$(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION) 146 147%.$(SECTION): $(srcdir)/%.$(SECTION).in 148 cd $(top_builddir) \ 149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 150 151 152ifeq (,$(MAKECMDGOALS)) 153-include $(DEPS) 154-include $(DERB_DEPS) 155else 156ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) 157-include $(DEPS) 158endif 159endif 160 161