Modify the Makefile logic for extracting documentation.

- Build the documentation when you run "make", as opposed to "make install"
 - Only rebuild the documentation when source code has been changed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.2
Russell Bryant 17 years ago
parent ee6a480a6c
commit 5528e210de

@ -351,7 +351,7 @@ all: _all
@echo " + $(mK) install +" @echo " + $(mK) install +"
@echo " +-------------------------------------------+" @echo " +-------------------------------------------+"
_all: cleantest makeopts $(SUBDIRS) _all: cleantest makeopts $(SUBDIRS) doc/core-en_US.xml
makeopts: configure makeopts: configure
@echo "****" @echo "****"
@ -484,19 +484,19 @@ datafiles: _all
mkdir -p $(DESTDIR)$(AGI_DIR) mkdir -p $(DESTDIR)$(AGI_DIR)
$(MAKE) -C sounds install $(MAKE) -C sounds install
documentation: doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc))
@echo -n "Building Documentation For: " @echo -n "Building Documentation For: "
@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > doc/core-en_US.xml @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> doc/core-en_US.xml @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
@echo "<docs>" >> doc/core-en_US.xml @echo "<docs>" >> $@
@for x in $(MOD_SUBDIRS); do \ @for x in $(MOD_SUBDIRS); do \
echo -n "$$x " ; \ echo -n "$$x " ; \
for i in $$x/*.c; do \ for i in $$x/*.c; do \
$(AWK) -f build_tools/get_documentation $$i >> doc/core-en_US.xml ; \ $(AWK) -f build_tools/get_documentation $$i >> $@ ; \
done ; \ done ; \
done done
@echo "</docs>" >> doc/core-en_US.xml @echo
@echo -e "\ndoc/core-en_US.xml --> $(ASTDATADIR)/documentation/core-en_US.xml" @echo "</docs>" >> $@
update: update:
@if [ -d .svn ]; then \ @if [ -d .svn ]; then \
@ -597,7 +597,7 @@ ifneq ($(findstring ~,$(DESTDIR)),)
@exit 1 @exit 1
endif endif
install: badshell datafiles documentation bininstall install: badshell datafiles bininstall
@if [ -x /usr/sbin/asterisk-post-install ]; then \ @if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi fi

Loading…
Cancel
Save