1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 1997-2019. All Rights Reserved. 5# 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18# %CopyrightEnd% 19# 20include $(ERL_TOP)/make/target.mk 21include $(ERL_TOP)/make/$(TARGET)/otp.mk 22 23# ---------------------------------------------------- 24# Application version 25# ---------------------------------------------------- 26include ../../vsn.mk 27VSN=$(KERNEL_VSN) 28APPLICATION=kernel 29 30# ---------------------------------------------------- 31# Release directory specification 32# ---------------------------------------------------- 33RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) 34 35# ---------------------------------------------------- 36# Target Specs 37# ---------------------------------------------------- 38XML_APPLICATION_FILES = ref_man.xml 39 40XML_REF3_FILES = application.xml \ 41 auth.xml \ 42 code.xml \ 43 disk_log.xml \ 44 erl_boot_server.xml \ 45 erl_ddll.xml \ 46 erl_epmd.xml \ 47 erl_prim_loader_stub.xml \ 48 erlang_stub.xml \ 49 error_handler.xml \ 50 error_logger.xml \ 51 file.xml \ 52 gen_tcp.xml \ 53 gen_udp.xml \ 54 gen_sctp.xml \ 55 global.xml \ 56 global_group.xml \ 57 heart.xml \ 58 inet.xml \ 59 inet_res.xml \ 60 init_stub.xml \ 61 logger.xml \ 62 logger_std_h.xml \ 63 logger_disk_log_h.xml \ 64 logger_filters.xml \ 65 logger_formatter.xml \ 66 net.xml \ 67 net_adm.xml \ 68 net_kernel.xml \ 69 os.xml \ 70 pg2.xml \ 71 rpc.xml \ 72 seq_trace.xml \ 73 wrap_log_reader.xml \ 74 user.xml \ 75 zlib_stub.xml 76 77XML_REF4_FILES = app.xml config.xml 78 79XML_REF6_FILES = kernel_app.xml 80 81XML_PART_FILES = part.xml 82XML_CHAPTER_FILES = \ 83 notes.xml \ 84 introduction_chapter.xml \ 85 logger_chapter.xml \ 86 logger_cookbook.xml 87 88BOOK_FILES = book.xml 89 90# The .png file is generated from a .dia file with target 'update_png' 91IMAGE_FILES = \ 92 logger_arch.png 93 94XML_FILES = \ 95 $(BOOK_FILES) $(XML_CHAPTER_FILES) \ 96 $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES)\ 97 $(XML_REF6_FILES) $(XML_APPLICATION_FILES) 98 99# ---------------------------------------------------- 100 101HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ 102 $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) 103 104INFO_FILE = ../../info 105 106MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) 107MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4) 108MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6) 109 110HTML_REF_MAN_FILE = $(HTMLDIR)/index.html 111 112TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf 113 114SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml) 115 116TOP_SPECS_FILE = specs.xml 117 118 119# ---------------------------------------------------- 120# FIGURES 121# ---------------------------------------------------- 122# In order to update the figures you have to have both dia 123# and imagemagick installed. 124# The generated .png file must be committed. 125 126update_png: 127 dia --export=logger_arch.eps logger_arch.dia 128 convert logger_arch.eps -resize 65% logger_arch.png 129 130# ---------------------------------------------------- 131# FLAGS 132# ---------------------------------------------------- 133XML_FLAGS += 134 135SPECS_ESRC = ../../src 136 137SPECS_FLAGS = -I../../include 138 139# ---------------------------------------------------- 140# Targets 141# ---------------------------------------------------- 142$(HTMLDIR)/%: % 143 $(INSTALL_DATA) $< $@ 144 145docs: man pdf html 146 147$(TOP_PDF_FILE): $(XML_FILES) 148 149pdf: $(TOP_PDF_FILE) 150 151html: images $(HTML_REF_MAN_FILE) 152 153man: $(MAN3_FILES) $(MAN4_FILES) $(MAN6_FILES) 154 155images: $(IMAGE_FILES:%=$(HTMLDIR)/%) 156 157info: 158 @echo "XML_APPLICATION_FILES: $(XML_APPLICATION_FILES)" 159 @echo "XML_REF3_ESOCK_FILES: $(XML_REF3_ESOCK_FILES)" 160 @echo "XML_REF3_FILES: $(XML_REF3_FILES)" 161 @echo "XML_REF4_FILES: $(XML_REF4_FILES)" 162 @echo "XML_REF6_FILES: $(XML_REF6_FILES)" 163 @echo "XML_PART_FILES: $(XML_PART_FILES)" 164 @echo "XML_CHAPTER_FILES: $(XML_CHAPTER_FILES)" 165 @echo "BOOK_FILES: $(BOOK_FILES)" 166 167debug opt: 168 169clean clean_docs: 170 rm -rf $(HTMLDIR)/* 171 rm -rf $(XMLDIR) 172 rm -f $(MAN3DIR)/* 173 rm -f $(MAN4DIR)/* 174 rm -f $(MAN6DIR)/* 175 rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) 176 rm -f $(SPECDIR)/* 177 rm -f errs core *~ *.eps 178 179$(SPECDIR)/specs_erl_prim_loader_stub.xml: 180 $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ 181 -o$(dir $@) -module erl_prim_loader_stub 182$(SPECDIR)/specs_erlang_stub.xml: 183 $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ 184 -o$(dir $@) -module erlang_stub 185$(SPECDIR)/specs_init_stub.xml: 186 $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ 187 -o$(dir $@) -module init_stub 188$(SPECDIR)/specs_zlib_stub.xml: 189 $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ 190 -o$(dir $@) -module zlib_stub 191 192 193# ---------------------------------------------------- 194# Release Target 195# ---------------------------------------------------- 196include $(ERL_TOP)/make/otp_release_targets.mk 197 198release_docs_spec: docs 199 $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf" 200 $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf" 201 $(INSTALL_DIR) "$(RELSYSDIR)/doc/html" 202 $(INSTALL_DATA) $(HTMLDIR)/* \ 203 "$(RELSYSDIR)/doc/html" 204 $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" 205 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" 206 $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" 207 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4" 208 $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4" 209 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6" 210 $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6" 211 212release_spec: 213