summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-03-30 10:51:14 -0400
committerCorey Farrell <git@cfware.com>2017-10-25 10:26:16 -0500
commit4772849016ec17c77045fc552944490fb4ab83f0 (patch)
tree61605523f5bf7da0f14790eab90524a3a92d3c33 /Makefile
parentcf63db721767bb6f1302ea3ed8e664494f1f63ec (diff)
Build System: Fix --disable-xmldoc option.
The configure option to disable XML documentation does not currently work. This patch makes it effective, but also causes an ABI change by removing the ast_xmldoc_* symbols. Disabling xmldoc also prevents docs from being automatically generated, but they can still be manually generated with 'make doc/core-en_US.xml'. ASTERISK-26639 Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bb8de1322..659ffed95 100644
--- a/Makefile
+++ b/Makefile
@@ -210,7 +210,9 @@ ifeq ($(AST_DEVMODE),yes)
ifeq ($(AST_DEVMODE_STRICT),yes)
_ASTCFLAGS+=-Wshadow
endif
- ADDL_TARGETS+=validate-docs
+ ifneq ($(DISABLE_XMLDOC),yes)
+ ADDL_TARGETS+=validate-docs
+ endif
endif
ifneq ($(findstring BSD,$(OSARCH)),)
@@ -248,6 +250,14 @@ ifneq ($(wildcard .svn),)
ASTERISKVERSIONNUM:=999999
endif
+ifneq ($(DISABLE_XMLDOC),yes)
+ CORE_XMLDOC=doc/core-en_US.xml
+ FULL_XMLDOC=doc/full-en_US.xml
+else
+ CORE_XMLDOC=
+ FULL_XMLDOC=
+endif
+
_ASTCFLAGS+=$(OPTIONS)
MOD_SUBDIRS:=third-party channels pbx apps codecs formats cdr cel bridges funcs tests main res addons $(LOCAL_MOD_SUBDIRS)
@@ -328,9 +338,9 @@ full: _full
@echo " +-------------------------------------------+"
-_all: makeopts $(SUBDIRS) doc/core-en_US.xml $(ADDL_TARGETS)
+_all: makeopts $(SUBDIRS) $(CORE_XMLDOC) $(ADDL_TARGETS)
-_full: makeopts $(SUBDIRS) doc/full-en_US.xml $(ADDL_TARGETS)
+_full: makeopts $(SUBDIRS) $(FULL_XMLDOC) $(ADDL_TARGETS)
makeopts: configure
@echo "****"
@@ -425,7 +435,7 @@ distclean: $(SUBDIRS_DIST_CLEAN) _clean
rm -f doc/asterisk-ng-doxygen
rm -f build_tools/menuselect-deps
-datafiles: _all doc/core-en_US.xml
+datafiles: _all $(CORE_XMLDOC)
CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
# # Recursively install contents of the static-http directory, in case
@@ -437,8 +447,10 @@ datafiles: _all doc/core-en_US.xml
$(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/$$x" ; \
fi \
done
+ifneq ($(DISABLE_XMLDOC),yes)
$(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
$(INSTALL) -m 644 doc/appdocsxml.xslt "$(DESTDIR)$(ASTDATADIR)/static-http";
+endif
if [ -d doc/tex/asterisk ] ; then \
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
for n in doc/tex/asterisk/* ; do \
@@ -567,9 +579,11 @@ bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall
for h in $(OLDHEADERS); do rm -f "$(DESTDIR)$(ASTHEADERDIR)/$$h"; done \
fi
+ifneq ($(DISABLE_XMLDOC),yes)
$(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
$(INSTALL) -m 644 doc/appdocsxml.xslt "$(DESTDIR)$(ASTDATADIR)/documentation"
$(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
+endif
$(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
$(INSTALL) -m 644 doc/astdb*.8 "$(DESTDIR)$(ASTMANDIR)/man8"
$(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"