[Asterisk-code-review] doc: Make progdocs play nice with git (asterisk[1.8])

George Joseph asteriskteam at digium.com
Thu May 7 15:37:50 CDT 2015


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/400

Change subject: doc: Make progdocs play nice with git
......................................................................

doc: Make progdocs play nice with git

Moved contrib/asterisk-ng-doxygen to doc/asterisk-ng-doxygen.in

Changed /Makefile to copy asterisk-ng-doxygen.in to
asterisk-ng-doxygen then modify it with version instead of
modifying asterisk-ng-doxygen directly.  Updated clean
targets as well.

Updated /.gitignore and doc/.gitignore.

Change-Id: I38712d3e334fa4baec19d30d05de8c6f28137622
---
M .gitignore
M Makefile
M doc/.gitignore
R doc/asterisk-ng-doxygen.in
4 files changed, 34 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/400/1

diff --git a/.gitignore b/.gitignore
index ed7704c..8426c0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,6 @@
 *.pyc
 *.gcno
 *.gcda
+latex
+doxygen.log
+
diff --git a/Makefile b/Makefile
index a2dc793..ad52701 100644
--- a/Makefile
+++ b/Makefile
@@ -391,6 +391,10 @@
 	rm -f include/asterisk/build.h
 	rm -f main/version.c
 	rm -f include/asterisk/version.h
+	rm -f doc/core-en_US.xml
+	rm -f doc/full-en_US.xml
+	rm -f doxygen.log
+	rm -rf latex
 	@$(MAKE) -C menuselect clean
 	cp -f .cleancount .lastclean
 
@@ -406,6 +410,7 @@
 	rm -f include/asterisk/autoconfig.h
 	rm -f include/asterisk/buildopts.h
 	rm -rf doc/api
+	rm -f doc/asterisk-ng-doxygen
 	rm -f build_tools/menuselect-deps
 
 datafiles: _all doc/core-en_US.xml
@@ -673,8 +678,30 @@
 	@echo " +-------------------------------------------+"  
 
 progdocs:
-	(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
-	echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen - 
+	# Note, Makefile conditionals must not be tabbed out. Wasted hours with that.
+	@cp doc/asterisk-ng-doxygen.in doc/asterisk-ng-doxygen
+ifeq ($(DOXYGEN),:)
+	@echo "Doxygen is not installed.  Please install and re-run the configuration script."
+else
+ifeq ($(DOT),:)
+	@echo "DOT is not installed. Doxygen will not produce any diagrams. Please install and re-run the configuration script."
+else
+	# Enable DOT
+	@echo "HAVE_DOT = YES" >> doc/asterisk-ng-doxygen
+endif
+	# Set Doxygen PROJECT_NUMBER variable
+ifneq ($(ASTERISKVERSION),UNKNOWN__and_probably_unsupported)
+	@echo "PROJECT_NUMBER = $(ASTERISKVERSION)" >> doc/asterisk-ng-doxygen
+else
+	echo "Asterisk Version is unknown, not configuring Doxygen PROJECT_NUMBER."
+endif
+	# Validate and auto-update local copy
+	@doxygen -u doc/asterisk-ng-doxygen
+	# Run Doxygen
+	@doxygen doc/asterisk-ng-doxygen
+	# Remove configuration backup file
+	@rm -f doc/asterisk-ng-doxygen.bak
+endif
 
 install-logrotate:
 	if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \
diff --git a/doc/.gitignore b/doc/.gitignore
index 27acdb3..7d534df 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1 +1,3 @@
 core-en_US.xml
+api
+asterisk-ng-doxygen
diff --git a/contrib/asterisk-ng-doxygen b/doc/asterisk-ng-doxygen.in
similarity index 100%
rename from contrib/asterisk-ng-doxygen
rename to doc/asterisk-ng-doxygen.in

-- 
To view, visit https://gerrit.asterisk.org/400
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38712d3e334fa4baec19d30d05de8c6f28137622
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 1.8
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list