cvs: php-gtk-doc / Makefile.in configure.in

From: Date: Sun, 26 Mar 2006 19:00:10 +0000
Subject: cvs: php-gtk-doc / Makefile.in configure.in
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1977@lists.php.net to get a copy of this message
sfox Sun Mar 26 19:00:10 2006 UTC Modified files: /php-gtk-doc Makefile.in configure.in Log: I spent my head in an autoconf manual today. - Introducing --disable-output - Also introducing a requirement and check for GNU make http://cvs.php.net/viewcvs.cgi/php-gtk-doc/Makefile.in?r1=1.23&r2=1.24&diff_format=u Index: php-gtk-doc/Makefile.in diff -u php-gtk-doc/Makefile.in:1.23 php-gtk-doc/Makefile.in:1.24 --- php-gtk-doc/Makefile.in:1.23 Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/Makefile.in Sun Mar 26 19:00:10 2006 @@ -14,7 +14,7 @@ # +----------------------------------------------------------------------+ # -# $Id: Makefile.in,v 1.23 2006/03/26 02:59:54 sfox Exp $ +# $Id: Makefile.in,v 1.24 2006/03/26 19:00:10 sfox Exp $ # # @@ -27,7 +27,7 @@ BUILD = build/@LANG@ BUILD_TEST = testbuild HISTORY = @HISTORY@ - +QUIET = @QUIET@ # # Programs and scripts # http://cvs.php.net/viewcvs.cgi/php-gtk-doc/configure.in?r1=1.29&r2=1.30&diff_format=u Index: php-gtk-doc/configure.in diff -u php-gtk-doc/configure.in:1.29 php-gtk-doc/configure.in:1.30 --- php-gtk-doc/configure.in:1.29 Sun Mar 26 02:59:54 2006 +++ php-gtk-doc/configure.in Sun Mar 26 19:00:10 2006 @@ -14,21 +14,32 @@ # +----------------------------------------------------------------------+ # -# $Id: configure.in,v 1.29 2006/03/26 02:59:54 sfox Exp $ +# $Id: configure.in,v 1.30 2006/03/26 19:00:10 sfox Exp $ AC_INIT + +make_command="" +for a in "$MAKE" make gmake gnumake; do +[ test -z "$a" ] && continue + if (sh -c "$a --version" 2>/dev/null | grep GNU >/dev/null); then + make_command=$a; + break; + fi +done + +if [ test -z $make_command ]; then + AC_MSG_ERROR(GNU make is required) +fi + AC_CONFIG_SRCDIR([manual/global.ent]) AC_PATH_PROG(XSLTPROC, xsltproc, no) -AC_PATH_PROG(PHP, php, no) - -if test "$XSLTPROC" = "no"; -then +if [ test "$XSLTPROC" = "no" ]; then AC_MSG_ERROR(cannot find xsltproc) fi -if test "$PHP" = "no"; -then +AC_PATH_PROG(PHP, php, no) +if [ test "$PHP" = "no" ]; then AC_MSG_ERROR(unable to locate php executable) fi @@ -47,69 +58,73 @@ PHP_GTK2_DOC_BUILD_DATE=date AC_SUBST(PHP_GTK2_DOC_BUILD_DATE) +TS=date -u +%Y%m%d +AC_SUBST(TS) + AC_MSG_CHECKING(for language) -AC_ARG_WITH(lang, -[ --with-lang=LANG choose a language to work with], +AC_ARG_WITH(lang, AC_HELP_STRING([--with-lang=LANG], [choose a language to work with]), [ - if test "$withval" - then - if test ! -d "$MANUAL/$withval"; - then - AC_MSG_RESULT() - AC_MSG_ERROR(Language "$withval" not supported!) - fi - LANG=$withval - LANGDIR=$MANUAL/$withval - AC_MSG_RESULT($withval) - fi +if [ test ! -d "$MANUAL/$withval" ]; then + AC_MSG_RESULT() + AC_MSG_ERROR(Language "$withval" not supported!) +fi +LANG=$withval +AC_MSG_RESULT($withval) ],[ - LANG=en - LANGDIR=$MANUAL/en - AC_MSG_RESULT([en (default)]) +LANG=en +AC_MSG_RESULT([en (default)]) ]) AC_SUBST(LANG) +LANGDIR=$MANUAL/$LANG AC_SUBST(LANGDIR) -TS=date -u +%Y%m%d -AC_SUBST(TS) - # need an old copy of the source to check against for updates -AC_ARG_WITH(history, -[ --with-history=HISTORY path to archived module copy (for updates) ], +AC_ARG_WITH(history, AC_HELP_STRING([--enable-history=PATH], [path to archived module copy (for updates)]), [ - if test "$withval" - then - AC_MSG_CHECKING(for path to archived module copy (for updates)) - HISTORY=$withval - AC_MSG_RESULT($withval) - AC_SUBST(HISTORY) - fi -]) - -AC_SUBST(HISTORY) - +HISTORY=$withval +AC_MSG_CHECKING(for archive path) +AC_MSG_RESULT($withval) if [ test -d $HISTORY/manual/$LANG ]; then - for xmlfile in find $LANGDIR -name "*.xml" | sed -e"s%^$LANGDIR\/%%g" | sort -do - if test -f $LANGDIR/$xmlfile - then - newfilepath=$LANGDIR/$xmlfile - oldfilepath=$HISTORY/manual/$LANG/$xmlfile - if test $newfilepath -nt $oldfilepath - then - echo Updating "$xmlfile"... - updates="$updates $newfilepath" + for xmlfile in find $LANGDIR -name "*.xml" | sed -e"s%^$LANGDIR\/%%g" | sort; do + if [ test -f $LANGDIR/$xmlfile ]; then + newfilepath=$LANGDIR/$xmlfile + oldfilepath=$HISTORY/manual/$LANG/$xmlfile + if [ test $newfilepath -nt $oldfilepath ]; then + echo Updating "$xmlfile"... + updates="$updates $newfilepath" + fi fi - fi -done; + done; +else + AC_MSG_ERROR(path "$withval" does not contain manual source!) fi +], +[HISTORY="no"]) + +AC_SUBST(HISTORY) + +# make quiet builds optional +AC_MSG_CHECKING(whether to build silently) +AC_ARG_ENABLE(output, AC_HELP_STRING([--disable-output], [whether to build silently]), +[ +RESULT=yes +QUIET=1 +], +[ +RESULT=no +QUIET=0 +]) + +AC_MSG_RESULT($RESULT) +AC_SUBST(QUIET) AC_CONFIG_FILES([\ Makefile \ $SCRIPT_DIR/manual.xml \ $SCRIPT_DIR/mtoc.xml \ $SCRIPT_DIR/testmanual.xml \ +$STYLESHEET_DIR/chunk.xsl \ $STYLESHEET_DIR/phpweb.xsl \ $STYLESHEET_DIR/updates.xsl \ $SCRIPT_DIR/genchapterents.php ]) @@ -123,19 +138,16 @@ #now add the list of updated files to the testclasses.xml # this has to be done after chapters.ent is created -if test -n "$updates" ; then - echo creating $SCRIPT_DIR/testclasses.xml -for updatedfile in $updates -do - # need to remove 'manual/' from the search path since the dir structure changed - updatedfile=echo $updatedfile | sed -e "s/$MANUAL\///g" - ref=grep -e "$updatedfile" $MANUAL/chapters.ent | sed "s/^<!ENTITY //" | sed "s/ .*//" - if test -n "$ref"; then - refs="$refs \&$ref;" - fi -done - -sed "s/@TEST_REFERENCES@/$refs/g" $SCRIPT_DIR/testclasses.xml.in > $SCRIPT_DIR/testclasses.xml +if [ test -n "$updates" ]; then + echo creating $SCRIPT_DIR/testclasses.xml + for updatedfile in $updates; do + updatedfile=echo $updatedfile | sed -e "s/$MANUAL\///g" + ref=grep -e "$updatedfile" $MANUAL/chapters.ent | sed "s/^<!ENTITY //" | sed "s/ .*//" + if [ test -n "$ref"]; then + refs="$refs \&$ref;" + fi + done + sed "s/@TEST_REFERENCES@/$refs/g" $SCRIPT_DIR/testclasses.xml.in > $SCRIPT_DIR/testclasses.xml fi chmod +x $SCRIPT_DIR/genchapterents.php

« previous php.gtk.doc (#1977) next »