diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/snmp/doc/src/Makefile | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/snmp/doc/src/Makefile')
-rw-r--r-- | lib/snmp/doc/src/Makefile | 349 |
1 files changed, 349 insertions, 0 deletions
diff --git a/lib/snmp/doc/src/Makefile b/lib/snmp/doc/src/Makefile new file mode 100644 index 0000000000..e1e3c7f41a --- /dev/null +++ b/lib/snmp/doc/src/Makefile @@ -0,0 +1,349 @@ +#-*-makefile-*- ; force emacs to enter makefile-mode + +# %CopyrightBegin% +# +# Copyright Ericsson AB 1997-2009. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% + +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include ../../vsn.mk +VSN = $(SNMP_VSN) +APPLICATION=snmp + +# ---------------------------------------------------- +# Include dependency +# ---------------------------------------------------- + +ifndef DOCSUPPORT +include make.dep +endif + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- + +MIBSDIR = ../../mibs +include files.mk + +# ---------------------------------------------------- + +HTML_APP_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) +XML_PART_FILE2 = $(XML_PART_FILES) notes_history.xml +HTML_PART_FILES = \ + ../html/notes_history.html \ + $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) + +HTML_FILES = \ + $(HTML_APP_FILES) \ + $(HTML_PART_FILES) + +XML_ERRS = $(XML_FILES:%.xml=%.latex.xmls_errs) \ + $(XML_FILES:%.xml=%.html.xmls_errs) + +XML_OUTPUT = $(XML_FILES:%.xml=%.latex.xmls_output) \ + $(XML_FILES:%.xml=%.html.xmls_output) + +INFO_FILE = ../../info + +HTML_REF3_FILES = $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) +HTML_REF6_FILES = $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) +HTML_CHAP_FILES = $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) + +EXTRA_FILES = summary.html.src \ + $(DEFAULT_HTML_FILES) \ + $(HTML_REF3_FILES) \ + $(HTML_REF6_FILES) \ + $(HTML_CHAP_FILES) + + +MAN7DIR = $(DOCDIR)/man7 + +MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) +MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6) +MAN7_FILES = $(MIB_FILES:$(MIBSDIR)/%.mib=$(MAN7DIR)/%.7) + +ifdef DOCSUPPORT + +HTML_REF_MAN_FILE = $(HTMLDIR)/index.html + +TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf + +else + +TEX_FILES_BOOK = \ + $(BOOK_FILES:%.xml=%.tex) +TEX_FILES_REF_MAN = \ + $(XML_REF3_FILES:%.xml=%.tex) \ + $(XML_REF6_FILES:%.xml=%.tex) \ + $(XML_APPLICATION_FILES:%.xml=%.tex) +TEX_PART_FILES = $(XML_PART_FILES:%.xml=%.tex) +TEX_FILES_USERS_GUIDE = \ + $(XML_CHAPTER_FILES:%.xml=%.tex) + +TOP_PDF_FILE = snmp-$(VSN).pdf +TOP_PS_FILE = snmp-$(VSN).ps + +$(TOP_PDF_FILE): book.dvi ../../vsn.mk + @echo "building $(TOP_PDF_FILE)" + $(DVI2PS) $(DVIPS_FLAGS) -f $< | $(DISTILL) $(DISTILL_FLAGS) > $@ + +$(TOP_PS_FILE): book.dvi ../../vsn.mk + @echo "building $(TOP_PS_FILE)" + $(DVI2PS) $(DVIPS_FLAGS) -f $< > $@ + +TOP_HTML_FILES = $(INDEX_TARGET) + +endif + +INDEX_FILE = index.html +INDEX_SRC = $(INDEX_FILE).src +INDEX_TARGET = $(DOCDIR)/$(INDEX_FILE) + +GIF_TARGETS = $(GIF_FILES:%=$(HTMLDIR)/%) + + +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- +XML_FLAGS += +DVIPS_FLAGS += + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- +$(HTMLDIR)/%.gif: %.gif # Copy them to ../html + $(INSTALL_DATA) $< $@ + +ifdef DOCSUPPORT + +docs: pdf html man + +ldocs: local_docs $(INDEX_TARGET) + +$(TOP_PDF_FILE): $(XML_FILES) + +pdf: $(TOP_PDF_FILE) + +html: gifs $(HTML_REF_MAN_FILE) + +clean clean_docs: clean_html clean_man clean_pdf + rm -f errs core *~ + +else + +ifeq ($(DOCTYPE),pdf) +docs: pdf +else +ifeq ($(DOCTYPE),ps) +docs: ps +else +docs: html gifs man +endif +endif + +pdf: $(TOP_PDF_FILE) + +ps: $(TOP_PS_FILE) + +html: $(HTML_FILES) $(TOP_HTML_FILES) gifs + +html2: gifs $(TOP_HTML_FILES) $(HTML_FILES) $(HTML_REF3_FILES) $(HTML_REF6_FILES) $(HTML_CHAP_FILES) + +clean: clean_tex clean_html clean_man clean_docs + + +clean_tex: + @echo "cleaning tex:" + rm -f $(TEX_FILES_USERS_GUIDE) + rm -f $(TEX_FILES_REF_MAN) + rm -f $(TEX_PART_FILES) + rm -f $(TEX_FILES_BOOK) + +clean_docs: + @echo "cleaning docs:" + rm -f $(TOP_PDF_FILE) + rm -f $(TOP_PS_FILE) + rm -f core $(LATEX_CLEAN) + + +$(HTML_PART_FILES): notes.xml + +endif + +$(INDEX_TARGET): $(INDEX_SRC) ../../vsn.mk # Create top make file + sed -e 's;%VSN%;$(VSN);' $< > $@ # inserting version number + +man: man3 man6 man7 + +man3: $(MAN3_FILES) + +man6: $(MAN6_FILES) + +man7: $(MAN7_FILES) + +gifs: $(GIF_TARGETS) + +debug opt: + +clean_pdf: + @echo "cleaning pdf:" + rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) + +clean_man: + @echo "cleaning man:" + rm -f $(MAN3DIR)/* + rm -f $(MAN6DIR)/* + rm -f $(MAN7DIR)/* + +clean_html: + @echo "cleaning html:" + rm -rf $(HTMLDIR)/* + +$(MAN7DIR)/%.7: $(MIBSDIR)/%.mib + @echo "processing $*" + @echo ".TH $* 7 \"SNMP\" \"Erlang/OTP\" \"MIB\"" > $@ + @echo ".nf" >> $@ + @cat $< >> $@ + @echo ".fi" >> $@ + @echo "" >> $@ + + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +ifdef DOCSUPPORT + +release_docs_spec: docs + $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf + $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf + $(INSTALL_DIR) $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(HTMLDIR)/* \ + $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) + $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 + $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3 + $(INSTALL_DIR) $(RELEASE_PATH)/man/man6 + $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man6 + $(INSTALL_DIR) $(RELEASE_PATH)/man/man7 + $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man7 + +else + + +ifeq ($(DOCTYPE),pdf) +release_docs_spec: pdf + $(INSTALL_DIR) $(RELEASE_PATH)/pdf + $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELEASE_PATH)/pdf +else +ifeq ($(DOCTYPE),ps) +release_docs_spec: ps + $(INSTALL_DIR) $(RELEASE_PATH)/ps + $(INSTALL_DATA) $(TOP_PS_FILE) $(RELEASE_PATH)/ps +else +release_docs_spec: docs + $(INSTALL_DIR) $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTML_FILES) \ + $(RELSYSDIR)/doc/html + $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) + $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 + $(INSTALL_DATA) $(MAN3_FILES) $(RELEASE_PATH)/man/man3 + $(INSTALL_DIR) $(RELEASE_PATH)/man/man6 + $(INSTALL_DATA) $(MAN6_FILES) $(RELEASE_PATH)/man/man6 + $(INSTALL_DIR) $(RELEASE_PATH)/man/man7 + $(INSTALL_DATA) $(MAN7_FILES) $(RELEASE_PATH)/man/man7 + $(INSTALL_DATA) $(TOP_HTML_FILES) \ + $(RELSYSDIR)/doc +endif +endif + +endif + +release_spec: + +ifdef DOCSUPPORT +info: info_xml info_man info_html +else +info: info_xml info_man info_html info_tex + @echo "DVI2PS = $(DVI2PS)" + @echo "DVIPS_FLAGS = $(DVIPS_FLAGS)" + @echo "" + @echo "DISTILL = $(DISTILL)" + @echo "DISTILL_FLAGS = $(DISTILL_FLAGS)" +endif + +info_man: + @echo "man files:" + @echo "MAN3_FILES = $(MAN3_FILES)" + @echo "MAN6_FILES = $(MAN6_FILES)" + @echo "MAN7_FILES = $(MAN7_FILES)" + @echo "" + @echo "MIB_FILES = $(MIB_FILES)" + +info_xml: + @echo "xml files:" + @echo "XML_REF3_FILES = $(XML_REF3_FILES)" + @echo "XML_REF6_FILES = $(XML_REF6_FILES)" + @echo "XML_PART_FILES = $(XML_PART_FILES)" + @echo "XML_CHAPTER_FILES = $(XML_CHAPTER_FILES)" + @echo "XML_APPLICATION_FILES = $(XML_APPLICATION_FILES)" + @echo "" + @echo "BOOK_FILES = $(BOOK_FILES)" + @echo "" + @echo "XML_FILES = $(XML_FILES)" + @echo "XML_ERRS = $(XML_ERRS)" + @echo "XML_OUTPUT = $(XML_OUTPUT)" + +info_html: + @echo "html files:" + @echo "DOCDIR = $(DOCDIR)" + @echo "INDEX_FILE = $(INDEX_FILE)" + @echo "INDEX_SRC = $(INDEX_SRC)" + @echo "INDEX_TARGET = $(INDEX_TARGET)" + @echo "" + @echo "HTMLDIR = $(HTMLDIR)" + @echo "HTML_APP_FILES = $(HTML_APP_FILES)" + @echo "HTML_PART_FILES = $(HTML_PART_FILES)" + @echo "HTML_FILES = $(HTML_FILES)" + @echo "" + @echo "EXTRA_FILES = $(EXTRA_FILES)" + @echo "" + @echo "DEFAULT_HTML_FILES = $(DEFAULT_HTML_FILES)" + @echo "" + @echo "HTML_REF3_FILES = $(HTML_REF3_FILES)" + @echo "HTML_REF6_FILES = $(HTML_REF6_FILES)" + @echo "HTML_CHAP_FILES = $(HTML_CHAP_FILES)" + +info_tex: + @echo "tex files:" + @echo "TEX_FILES_USERS_GUIDE = $(TEX_FILES_USERS_GUIDE)" + @echo "TEX_FILES_REF_MAN = $(TEX_FILES_REF_MAN)" + @echo "TEX_PART_FILES = $(TEX_PART_FILES)" + @echo "TEX_FILES_BOOK = $(TEX_FILES_BOOK)" + +ifndef DOCSUPPORT +include depend.mk +endif |