1# 2# Copyright (C) 2017 and later: Unicode, Inc. and others. 3# License & terms of use: http://www.unicode.org/copyright.html 4# 5# Copyright (C) 2008-2012 IBM Corporation and Others. All Rights Reserved. 6MULTICU_ROOT=../../ 7include $(MULTICU_ROOT)/common/Makefile-multi.inc 8 9XML=./xml 10JXML=./jxml 11JVMXML=./jvmxml 12 13COOKED=cooked 14INPUT=input 15INTROXMLS=$(wildcard $(INPUT)/*-introduction.xml) 16FEATXMLS=$(INTROXMLS:$(INPUT)/%-introduction.xml=$(COOKED)/%-cooked.xml) $(COOKED)/characters.xml 17ALLCOOKED=cooked/features.xml 18 19# java stuff 20MergerName=Merger 21PropagateName=PropagateFeatures 22PropagateCharsName=PropagateCharacters 23MergerPackage=com.ibm.icu.dev.meta 24MergerPackageSlash=$(subst .,/,$(MergerPackage)) 25## ICUMETA=/xsrl/E/data/meta (in Makefile.local) 26MergerLib=$(ICUMETA)/lib 27MergerJar=$(ICUMETA)/icumeta.jar 28#was: $(ICUMETA)/classes 29MergerClassPath=$(shell ls $(MergerLib)/*.jar | tr '\n' ':')$(MergerJar):$(OTHERJARS) 30include Makefile.local 31MergerBuild=$(ICUMETA)/build.xml 32#MergerClass=$(ICUMETA)/classes/$(MergerPackageSlash)/$(MergerName).class 33#MergerJava=$(ICUMETA)/src/$(MergerPackageSlash)/$(MergerName).java 34#BASEXMLS=$(ICUMETA)/xml/icumeta.xml 35BASEXMLS=$(ICUMETA)/input/versions.xml 36 37 38APRECIOUS=$(ICUVERS:%=$(BLD)/%/$(S_SRC)) $(ICUVERS:%=$(BLD)/%/$(S_BLD)) $(ICUVERS:%=$(INS)/%/$(S_INS)) 39 40all: icucaps.xml 41 42.PRECIOUS: $(APRECIOUS) 43 44tehprecious: 45 echo $(APRECIOUS) 46 47$(MergerJar): 48 ( cd $(ICUMETA) ; ant jar ) 49 50$(BLD): 51 -mkdir $(BLD) 52 53$(XML): 54 -mkdir $(XML) 55 56$(JXML): 57 -mkdir $(JXML) 58 59$(JVMXML): 60 -mkdir $(JXML) 61 62ifeq ($(JVMSH),) 63JVMSH_WARN=warn-jvmsh 64warn-jvmsh: 65 @echo "Note: No $(JVM)/*$(JVM_CFG) files found, see $(JVM)/readme.txt" 66endif 67 68 69DTDCACHE=$(shell pwd)/dtdcache 70DTDTMP=$(shell pwd)/dtdtmp 71DTDOVR=$(ICUMETA)/dtd 72JAVADEBUG=-DCLDR_DTD_CACHE_DEBUG=n -DCLDR_DTD_CACHE_ADEBUG=n 73JAVAPROPS= -DCLDR_DTD_CACHE=$(DTDCACHE) -DCLDR_DTD_OVERRIDE=$(DTDOVR) -DICU_DTD_CACHE=$(DTDCACHE) -DICU_DTD_OVERRIDE=$DTDOVR 74 75#//$(DTD)/Makefile: $(ICUMETA)/dtd/Makfile 76#// ln -s $^ $@ 77#// 78#//dtd/icucaps.dtd: $(DTD)/Makefile dtd/icucaps.rnc 79#// make -C $(DTD) 80 81ICUMETA_XML=$(ICUMETA)/xml/icumeta.xml 82BASE_VERSION=$(COOKED)/allversions.xml 83BASE_SOURCE=$(BASEXMLS) $(INPUT)/java.xml 84 85 86#$(ICUMETA)/xml/icumeta.xml: $(MergerBuild) 87# ( cd $(ICUMETA) ; ant xml ) 88 89ALLXMLS=$(wildcard $(XML)/*.xml $(JXML)/*.xml $(JVMXML)/*.xml) 90 91allxmls: $(XML) $(JXML) $(JVMXML) 92 $(MAKE) -f Makefile_c outfiles 93 $(MAKE) -f Makefile_j outfiles 94 95 96featxmls: $(FEATXMLS) 97 98allcooked: $(ALLCOOKED) 99 100$(COOKED): 101 -mkdir $(COOKED) 102 103$(BASE_VERSION): $(BASE_SOURCE) $(MergerJar) | $(COOKED) 104 -rm -rf ./dtdcache 105 mkdir dtdcache 106 java $(JAVAPROPS) -classpath $(MergerClassPath) $(MergerPackage).$(MergerName) -v -o:$@ $(BASE_SOURCE) 107 108$(ALLCOOKED): $(FEATXMLS) $(MergerJar) 109 -rm -rf ./dtdcache 110 mkdir dtdcache 111 java $(JAVAPROPS) -classpath $(MergerClassPath) $(MergerPackage).$(MergerName) -v -o:$@ $(FEATXMLS) 112 113$(COOKED)/%-cooked.xml: $(BASE_VERSION) $(INPUT)/%-introduction.xml $(MergerJar) | $(COOKED) 114 -rm -rf ./dtdcache 115 mkdir dtdcache 116 java $(JAVAPROPS) -classpath $(MergerClassPath) $(MergerPackage).$(PropagateName) $(BASE_VERSION) $(INPUT)/$*-introduction.xml > $(COOKED)/$*-cooked.xml 117 118$(COOKED)/characters.xml: $(ALLXMLS) $(COOKED)/junicode-cooked.xml $(MergerJar) 119 java $(JAVAPROPS) -classpath $(MergerClassPath) $(MergerPackage).$(PropagateCharsName) > $@ $(ALLXMLS) $(COOKED)/junicode-cooked.xml || (rm ./$@ ; false) 120 121 122icucaps.xml: allxmls $(BASE_VERSION) $(ALLXMLS) $(MergerJar) $(ALLCOOKED) 123 -rm -rf ./dtdcache 124 mkdir dtdcache 125# -rm -rf ./dtdtmp 126# mkdir dtdtmp 127# ln -s $(ICUMETA)/dtd/*.dtd ./dtdtmp/ 128# ln -s ./dtd/*.dtd ./dtdtmp/ 129 java $(JAVAPROPS) -classpath $(MergerClassPath) $(MergerPackage).$(MergerName) -v -o:$@ $(BASE_VERSION) $(ALLXMLS) $(ALLJXMLS) $(ALLCOOKED) 130 131