Add a handy makefile target so that you can validate the documentation against the DTD
authorRussell Bryant <russell@russellbryant.com>
Sun, 2 Nov 2008 05:55:46 +0000 (05:55 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 2 Nov 2008 05:55:46 +0000 (05:55 +0000)
by running "make validate-docs"

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153578 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
configure
configure.ac
makeopts.in

index 90a47c9..922647f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -498,6 +498,15 @@ doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildca
        @echo
        @echo "</docs>" >> $@
 
+validate-docs: doc/core-en_US.xml
+ifeq ($(XMLSTARLET),:)
+       @echo "---------------------------------------------------------------"
+       @echo "--- Please install xmlstarlet to validate the documentation ---"
+       @echo "---------------------------------------------------------------"
+else
+       $(XMLSTARLET) val $<
+endif
+
 update: 
        @if [ -d .svn ]; then \
                echo "Updating from Subversion..." ; \
index 5abf42f..4d141dc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 151252 .
+# From configure.ac Revision: 153365 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
@@ -712,6 +712,7 @@ DOT
 WGET
 RUBBER
 KPATHSEA
+XMLSTARLET
 FETCH
 DOWNLOAD
 SOXMIX
@@ -7316,6 +7317,47 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 
+# Extract the first word of "xmlstarlet", so it can be a program name with args.
+set dummy xmlstarlet; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XMLSTARLET+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $XMLSTARLET in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XMLSTARLET="$XMLSTARLET" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XMLSTARLET="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_XMLSTARLET" && ac_cv_path_XMLSTARLET=":"
+  ;;
+esac
+fi
+XMLSTARLET=$ac_cv_path_XMLSTARLET
+if test -n "$XMLSTARLET"; then
+  { echo "$as_me:$LINENO: result: $XMLSTARLET" >&5
+echo "${ECHO_T}$XMLSTARLET" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
 else
@@ -51393,10 +51435,10 @@ DOT!$DOT$ac_delim
 WGET!$WGET$ac_delim
 RUBBER!$RUBBER$ac_delim
 KPATHSEA!$KPATHSEA$ac_delim
+XMLSTARLET!$XMLSTARLET$ac_delim
 FETCH!$FETCH$ac_delim
 DOWNLOAD!$DOWNLOAD$ac_delim
 SOXMIX!$SOXMIX$ac_delim
-acx_pthread_config!$acx_pthread_config$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -51438,6 +51480,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+acx_pthread_config!$acx_pthread_config$ac_delim
 PTHREAD_CC!$PTHREAD_CC$ac_delim
 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
@@ -51534,7 +51577,6 @@ LUA_LIB!$LUA_LIB$ac_delim
 LUA_INCLUDE!$LUA_INCLUDE$ac_delim
 LUA_DIR!$LUA_DIR$ac_delim
 PBX_LUA!$PBX_LUA$ac_delim
-MISDN_LIB!$MISDN_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -51576,6 +51618,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+MISDN_LIB!$MISDN_LIB$ac_delim
 MISDN_INCLUDE!$MISDN_INCLUDE$ac_delim
 MISDN_DIR!$MISDN_DIR$ac_delim
 PBX_MISDN!$PBX_MISDN$ac_delim
@@ -51672,7 +51715,6 @@ SQLITE_INCLUDE!$SQLITE_INCLUDE$ac_delim
 SQLITE_DIR!$SQLITE_DIR$ac_delim
 PBX_SQLITE!$PBX_SQLITE$ac_delim
 SQLITE3_LIB!$SQLITE3_LIB$ac_delim
-SQLITE3_INCLUDE!$SQLITE3_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -51714,6 +51756,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+SQLITE3_INCLUDE!$SQLITE3_INCLUDE$ac_delim
 SQLITE3_DIR!$SQLITE3_DIR$ac_delim
 PBX_SQLITE3!$PBX_SQLITE3$ac_delim
 SUPPSERV_LIB!$SUPPSERV_LIB$ac_delim
@@ -51809,7 +51852,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 6c69ce6..d1bd700 100644 (file)
@@ -176,6 +176,7 @@ AC_PATH_PROG([DOT], [dot], :)
 AC_PATH_PROG([WGET], [wget], :)
 AC_PATH_PROG([RUBBER], [rubber], :)
 AC_PATH_PROG([KPATHSEA], [kpsewhich], :)
+AC_PATH_PROG([XMLSTARLET], [xmlstarlet], :)
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
 else
index 0b6b3ff..eeccc1f 100644 (file)
@@ -24,6 +24,7 @@ FETCH=@FETCH@
 DOWNLOAD=@DOWNLOAD@
 RUBBER=@RUBBER@
 KPATHSEA=@KPATHSEA@
+XMLSTARLET=@XMLSTARLET@
 
 BUILD_PLATFORM=@BUILD_PLATFORM@
 BUILD_CPU=@BUILD_CPU@