1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 2010-2018. 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 23include ../../vsn.mk 24 25VSN = $(DIAMETER_VSN) 26 27RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) 28 29# ---------------------------------------------------- 30# Target Specs 31# ---------------------------------------------------- 32include files.mk 33 34XML_REF_FILES = $(XML_REF1_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES) 35 36XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) \ 37 $(XML_REF_FILES) \ 38 $(XML_PART_FILES) $(XML_CHAPTER_FILES) \ 39 $(XML_EXTRA_FILES) 40 41INFO_FILE = ../../info 42 43MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1) 44MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) 45MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4) 46 47PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf 48 49STANDARD_DIR = ../standard 50 51# ---------------------------------------------------- 52# Targets 53# ---------------------------------------------------- 54 55$(HTMLDIR)/%.gif: %.gif 56 $(INSTALL_DATA) $< $@ 57 58docs: pdf html man 59 60ldocs: local_docs $(INDEX_TARGET) 61 62$(PDF_FILE): $(XML_FILES) 63 64pdf: $(PDF_FILE) 65 66html: gifs $(HTMLDIR)/index.html 67 68clean clean_docs: clean_pdf clean_html clean_man 69 rm -f errs core *~ 70 rm -f depend.mk seehere.ent 71 72clean_pdf: 73 rm -f $(PDFDIR)/* 74 75clean_man: 76 rm -f $(MAN1DIR)/* $(MAN3DIR)/* $(MAN4DIR)/* 77 78clean_html: 79 rm -rf $(HTMLDIR)/* 80 rm -rf $(XMLDIR) 81 82gifs: $(GIF_FILES:%=$(HTMLDIR)/%) 83 84man: $(MAN1_FILES) $(MAN3_FILES) $(MAN4_FILES) 85 86$(INDEX_TARGET): $(INDEX_SRC) $(APP_FILE) 87 $(gen_verbose) \ 88 sed -e 's/%VSN%/$(VSN)/; \ 89 s/%ERLANG_SITE%/www\.erlang\.se\//; \ 90 s/%UP_ONE_LEVEL%/..\/..\/..\/doc\/index.html/; \ 91 s/%OFF_PRINT%/pdf\/diameter-$(VSN).pdf/' $< > $@ 92 93depend: depend.mk 94 95debug opt: 96 97info: 98 @echo "" 99 @echo "INDEX_FILE = $(INDEX_FILE)" 100 @echo "INDEX_SRC = $(INDEX_SRC)" 101 @echo "INDEX_TARGET = $(INDEX_TARGET)" 102 @echo "" 103 @echo "XML_APPLICATION_FILES = $(XML_APPLICATION_FILES)" 104 @echo "XML_PART_FILES = $(XML_PART_FILES)" 105 @echo "XML_REF1_FILES = $(XML_REF1_FILES)" 106 @echo "XML_REF3_FILES = $(XML_REF3_FILES)" 107 @echo "XML_REF4_FILES = $(XML_REF4_FILES)" 108 @echo "XML_CHAPTER_FILES = $(XML_CHAPTER_FILES)" 109 @echo "" 110 @echo "GIF_FILES = $(GIF_FILES)" 111 @echo "" 112 @echo "MAN1_FILES = $(MAN1_FILES)" 113 @echo "MAN3_FILES = $(MAN3_FILES)" 114 @echo "MAN4_FILES = $(MAN4_FILES)" 115 @echo "" 116 @echo "DEFAULT_HTML_FILES = $(DEFAULT_HTML_FILES)" 117 @echo "DEFAULT_GIF_FILES = $(DEFAULT_GIF_FILES)" 118 @echo "" 119 120 121# ---------------------------------------------------- 122# Release Target 123# ---------------------------------------------------- 124 125include $(ERL_TOP)/make/otp_release_targets.mk 126 127release_docs_spec: $(LOCAL)docs 128 $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf" 129 $(INSTALL_DIR) "$(RELSYSDIR)/doc/html" 130 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1" 131 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" 132 $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4" 133 $(INSTALL_DATA) $(PDF_FILE) "$(RELSYSDIR)/doc/pdf" 134 $(INSTALL_DATA) $(HTMLDIR)/*.* "$(RELSYSDIR)/doc/html" 135 $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" 136 $(INSTALL_DATA) $(MAN1_FILES) "$(RELEASE_PATH)/man/man1" 137 $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3" 138 $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4" 139 [ -z "$(LOCAL)" ] || cp -r $(HTMLDIR)/js "$(RELSYSDIR)/doc/html" 140 echo $(LOCAL) 141 142release_spec: 143 144depend.mk: depend.sed Makefile seealso.ent \ 145 $(XML_REF_FILES) $(XML_CHAPTER_FILES) 146 $(gen_verbose) 147 $(V_at) \ 148 sed -f seehere.sed seealso.ent > seehere.ent 149 $(V_at) \ 150 (for f in $(XML_REF_FILES) $(XML_CHAPTER_FILES); do \ 151 sed -f $< $$f | sed "s@%FILE%@`basename $$f .xml`@g"; \ 152 done) \ 153 > $@ 154 155-include depend.mk 156 157.PHONY: clean clean_html clean_man clean_pdf \ 158 depend debug opt info \ 159 docs gifs html ldocs man pdf \ 160 release_docs_spec release_spec 161