• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) 2009-2013 IBM and Others. All Rights Reserved
6
7#
8#
9#
10#Usage:
11# make OLD_ICU=/xsrl/E/401m40  NEW_ICU=/xsrl/E/icu4ct42
12#
13# you can put the OLD_ICU=xx and NEW_ICU=yy in separate lines in Makefile.local
14#
15
16ANT=ant
17ANT_TARGET=apireport
18DOXYGEN=doxygen
19
20-include Makefile.local
21
22TARGET=APIChangeReport.html
23MD_TARGET=APIChangeReport.md
24
25NOTSET=
26
27ifeq ($(OLD_ICU),)
28NOTSET:="$(NOTSET) OLD_ICU"
29endif
30
31ifeq ($(NEW_ICU),)
32NOTSET:="$(NOTSET) NEW_ICU"
33endif
34
35ifeq ($(NEW_ICU_BUILD),)
36NEW_ICU_BUILD:=$(NEW_ICU)/source
37endif
38
39ifeq ($(OLD_ICU_BUILD),)
40OLD_ICU_BUILD:=$(OLD_ICU)/source
41endif
42
43all: $(TARGET) $(LOCAL_TARGET) $(MD_TARGET)
44
45# auto "build" the "old" icu into OLD_ICU_BUILD
46tmp-old: $(OLD_ICU)/source/configure
47	mkdir -p $(OLD_ICU_BUILD)/
48	( cd $(OLD_ICU_BUILD)/ && $(OLD_ICU)/source/configure )
49
50# auto "build" the "old" icu into OLD_ICU_BUILD
51tmp-new: $(NEW_ICU)/source/configure
52	mkdir -p $(NEW_ICU_BUILD)/
53	( cd $(NEW_ICU_BUILD)/ && $(NEW_ICU)/source/configure )
54
55inplace-old: $(OLD_ICU)/source/configure
56	mkdir -p $(OLD_ICU_BUILD)/
57	( cd $(OLD_ICU_BUILD)/ && ./configure )
58
59# auto "build" the "old" icu into OLD_ICU_BUILD
60inplace-new: $(NEW_ICU)/source/configure
61	mkdir -p $(NEW_ICU_BUILD)/
62	( cd $(NEW_ICU_BUILD)/ && ./configure )
63
64
65ifneq ($(NOTSET),)
66check-vars:
67	@echo "Error: please set $(NOTSET) in Makefile.local or on the command line."
68	false
69else
70check-vars:
71endif
72
73.PHONY: check-vars classes clean-docs tmp-old
74
75.PRECIOUS: $(TARGET) $(OLD_ICU_BUILD)/$(DOXYFILE) $(NEW_ICU_BUILD)/$(DOXYFILE)
76
77#######
78DOXYFILE=Doxyfile
79XML=doc/xml
80UVERSIONH=$(XML)/uversion_8h.xml
81
82clean-docs: | check-vars
83	-rm -rf "$(OLD_ICU_BUILD)/$(XML)" "$(NEW_ICU_BUILD)/$(XML)"
84
85$(TARGET): check-vars $(OLD_ICU_BUILD)/$(XML) $(NEW_ICU_BUILD)/$(XML)
86	echo "Remember to run the non-ascii file detector if you get errors."
87	$(ANT) -Dolddir="$(OLD_ICU_BUILD)/$(XML)" -Dnewdir="$(NEW_ICU_BUILD)/$(XML)" $(ANT_TARGET)
88	echo "If you get no-changes, see the readme- may need to add xalan/xerces jars."
89
90# check-vars $(OLD_ICU_BUILD)/$(XML) $(NEW_ICU_BUILD)/$(XML)
91APIChangeReport.xml: $(OLD_ICU_BUILD)/$(XML) $(NEW_ICU_BUILD)/$(XML)
92	echo "Remember to run the non-ascii file detector if you get errors."
93	$(ANT) -Dolddir="$(OLD_ICU_BUILD)/$(XML)" -Dnewdir="$(NEW_ICU_BUILD)/$(XML)" $(ANT_TARGET)_xml
94
95APIChangeReport.md: $(OLD_ICU_BUILD)/$(XML) $(NEW_ICU_BUILD)/$(XML)
96	echo "Remember to run the non-ascii file detector if you get errors."
97	$(ANT) -Dolddir="$(OLD_ICU_BUILD)/$(XML)" -Dnewdir="$(NEW_ICU_BUILD)/$(XML)" $(ANT_TARGET)_md
98
99%/doc/xml:	%/Doxyfile
100# don't care what GENERATE_XML is set to previously - set it to yes.
101	@echo running doxygen ..
102	( cd "$*/" && ( (cat ./Doxyfile | grep -v '^GENERATE_') ;  echo 'GENERATE_XML=YES')  | $(DOXYGEN) -  )
103	@echo doxygen done in $*
104
105%/Doxyfile:	%/Makefile
106	@echo generating $@
107	@$(MAKE) -C  "$*/" Doxyfile || ( echo "could not make Doxyfile in $*  - was doxygen available?" ; false )
108
109#%/source/Makefile: %/source/Makefile.in
110#	@echo "$@ does not seem to exist - was configure run?" ; false
111