1c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott################################################################################# 2c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Makefile.in for ICU - tools/genrb # 3c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Copyright (c) 1999-2009, International Business Machines Corporation and # 4c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## others. All Rights Reserved. # 5c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott################################################################################# 6c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# 7c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# 8c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# For Help with this Makefile and the procedures for generating ICU4J data, please see 9c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# "icu4j-readme.txt" in $icu4c_root/source/data 10c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# 11c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# 12c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 13c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 14c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Source directory information 15c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottsrcdir = @srcdir@ 16c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scotttop_srcdir = @top_srcdir@ 17c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 18c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scotttop_builddir = ../.. 19c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 20c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottinclude $(top_builddir)/icudefs.mk 21c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 22c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Build directory information 23c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottsubdir = tools/genrb 24c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 25c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottTARGET_STUB_NAME = genrb 26c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottDERB_STUB_NAME = derb 27c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 28c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottSECTION = 1 29c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 30c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottMAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION) 31c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 32c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 33c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Extra files to remove for 'make clean' 34c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottCLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS) 35c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 36c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Target information 37c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottTARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT) 38c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottDERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT) 39c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 40c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifneq ($(top_builddir),$(top_srcdir)) 41c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottCPPFLAGS += -I$(top_builddir)/common 42c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 43c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottCPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil 44c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottLIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) 45c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 46c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottOBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \ 47c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottwrtjava.o rle.o wrtxml.o prscmnts.o 48c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottDERB_OBJ = derb.o 49c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 50c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottDEPS = $(OBJECTS:.o=.d) 51c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottDERB_DEPS = $(DERB_OBJ:.o=.d) 52c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 53c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# build-icu4j variables 54c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR_ICUHOME=$(shell pwd)/../../.. 55c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR_OPTS=--icu-root="$(GENDTJAR_ICUHOME)" --jar="$(GENDTJAR_JARHOME)" --icu4j-root="$(ICU4J_HOME)" --verbose 56c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR_TEMP=./temp/ 57c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR=$(srcdir)/gendtjar.pl 58c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 59c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott-include Makefile.local 60c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 61c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifeq (,$(ICU4J_HOME)) 62c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottICU4J_HOME=$(shell pwd)/icu4j 63c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 64c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 65c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott##Added by Brian Rower 6/25/08 66c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott##if JAVA_HOME was not set, try to set it by finding jar 67c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifeq (,$(JAVA_HOME)) 68c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottJAVA_HOME=$(shell dirname `which jar`)/.. 69c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifeq (,$(GENDTJAR_JARHOME)) 70c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR_JARHOME=$(shell dirname `which jar`) 71c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 72c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 73c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 74c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott##if GENDTJAR_JARHOME (the directory that "jar" lives in) is not set 75c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott##set it equal to $JAVA_HOME/bin 76c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifeq (,$(GENDTJAR_JARHOME)) 77c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottGENDTJAR_JARHOME=""$(JAVA_HOME)"/bin" 78c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 79c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 80c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 81c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 82c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## List of phony targets 83c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott.PHONY : all all-local install install-local clean clean-local \ 84c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottdistclean distclean-local dist dist-local check check-local install-man \ 85c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottbuild-icu4j 86c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 87c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## Clear suffix list 88c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott.SUFFIXES : 89c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 90c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott## List of standard targets 91c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottall: all-local 92c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottinstall: install-local 93c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclean: clean-local 94c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottdistclean : distclean-local 95c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottdist: dist-local 96c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottcheck: all check-local 97c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 98c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottall-local: $(TARGET) $(DERB) $(MAN_FILES) 99c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 100c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottinstall-local: all-local install-man 101c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 102c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(INSTALL) $(TARGET) $(DESTDIR)$(bindir) 103c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(INSTALL) $(DERB) $(DESTDIR)$(bindir) 104c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 105c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottinstall-man: $(MAN_FILES) 106c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) 107c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) 108c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 109c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottdist-local: 110c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 111c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclean-local: 112c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) 113c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP) 114c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 115c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottdistclean-local: clean-local 116c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(RMV) Makefile 117c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 118c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottcheck-local: all-local 119c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 120c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick ScottMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 121c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott cd $(top_builddir) \ 122c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 123c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 124c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott$(TARGET) : $(OBJECTS) 125c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 126c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(POST_BUILD_STEP) 127c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 128c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott$(DERB) : $(DERB_OBJ) 129c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 130c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott $(POST_BUILD_STEP) 131c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 132c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#$(GENDTJAR_JARHOME)/jar: 133c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# @echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in 134c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# exit 1 135c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 136c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott$(ICU4J_HOME)/build.xml: 137c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott @echo warning: $@ not found - make sure ICU4J_HOME is set. 138c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 139c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 140c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#Removed GENDTJAR_JARHOME dependancy. If the file path happens to contain a space in it, 141c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#having it as a target will cause it to error out when it thinks that there are TWO targets. - Brian Rower 6/25/08 142c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottbuild-icu4j: $(GENDTJAR) $(ICU4J_HOME)/build.xml #$(GENDTJAR_JARHOME)/jar 143c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott # clean up old temp files 144c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott -$(RMV) $(GENDTJAR_TEMP) 145c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott perl $(GENDTJAR) $(GENDTJAR_OPTS) 146c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott @echo Finished building to $(ICU4J_HOME) 147c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 148c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 149c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott# This line is needed to serialize builds when the gmake -j option is used. 150c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott$(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION) 151c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 152c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott%.$(SECTION): $(srcdir)/%.$(SECTION).in 153c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott cd $(top_builddir) \ 154c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 155c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 156c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 157c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifeq (,$(MAKECMDGOALS)) 158c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott-include $(DEPS) 159c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott-include $(DERB_DEPS) 160c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottelse 161c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) 162c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott-include $(DEPS) 163c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 164c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottendif 165c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 166