[asterisk-commits] lathama: trunk r374940 - in /trunk: Makefile configure configure.ac makeopts.in

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 13 10:06:45 CDT 2012


Author: lathama
Date: Sat Oct 13 10:06:39 2012
New Revision: 374940

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374940
Log:
Add check for Doxygen

The autoconf configuration system had a test for DOT but not for Doxygen.  I added the test for Doxygen and did an overhaul of the Makefile check to a much simpler process.

(issue ASTERISK-20259)

Modified:
    trunk/Makefile
    trunk/configure
    trunk/configure.ac
    trunk/makeopts.in

Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=374940&r1=374939&r2=374940
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Oct 13 10:06:39 2012
@@ -290,13 +290,6 @@
 SUBMAKE:=$(MAKE)
 else
 SUBMAKE:=$(MAKE) --quiet --no-print-directory
-endif
-
-# This is used when generating the doxygen documentation
-ifneq ($(DOT),:)
-  HAVEDOT=yes
-else
-  HAVEDOT=no
 endif
 
 # $(MAKE) is printed in several places, and we want it to be a
@@ -743,10 +736,25 @@
 	@echo " +-------------------------------------------+"
 
 progdocs:
-	doxygen -u contrib/asterisk-ng-doxygen
-	(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
-	echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
-	rm -f contrib/asterisk-ng-doxygen.bak
+	# Note, Makefile conditionals must not be tabbed out. Wasted hours with that.
+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
+	@sed -i "/^HAVE_DOT/s/NO/YES/" contrib/asterisk-ng-doxygen
+endif
+	# Set Doxygen PROJECT_NUMBER variable
+	@sed -i "/^PROJECT_NUMBER/s/PROJECT_NUMBER.*/PROJECT_NUMBER = "$(ASTERISKVERSION)"/" contrib/asterisk-ng-doxygen
+	# Validate Doxygen Configuration
+	@doxygen -u contrib/asterisk-ng-doxygen
+	# Run Doxygen
+	@doxygen contrib/asterisk-ng-doxygen
+	# Remove configuration backup file
+	@rm -f contrib/asterisk-ng-doxygen.bak
+endif
 
 install-logrotate:
 	if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \

Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=374940&r1=374939&r2=374940
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Oct 13 10:06:39 2012
@@ -254,6 +254,7 @@
 AC_PATH_PROG([DIRNAME], [dirname], :)
 AC_PATH_PROG([SHELL], [sh], :)
 AC_PATH_PROG([LN], [ln], :)
+AC_PATH_PROG([DOXYGEN], [doxygen], :)
 AC_PATH_PROG([DOT], [dot], :)
 AC_PATH_PROG([WGET], [wget], :)
 AC_PATH_PROG([CURL], [curl], :)

Modified: trunk/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/trunk/makeopts.in?view=diff&rev=374940&r1=374939&r2=374940
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Sat Oct 13 10:06:39 2012
@@ -21,6 +21,7 @@
 BASENAME=@BASENAME@
 SHELL=@SHELL@
 LN=@LN@
+DOXYGEN=@DOXYGEN@
 DOT=@DOT@
 STRIP=@STRIP@
 WGET=@WGET@




More information about the asterisk-commits mailing list