Mercurial > hg > octave-kai > gnulib-hg
changeset 6955:7715890c929a
* gnulib-tool: List --doc-base before --tests-base.
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Tue, 11 Jul 2006 15:27:08 +0000 |
parents | f9276a8d45a7 |
children | beedd5d51056 |
files | ChangeLog gnulib-tool |
diffstat | 2 files changed, 43 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-11 Eric Blake <ebb9@byu.net> + + * gnulib-tool: List --doc-base before --tests-base. + 2006-07-11 Eric Blake <ebb9@byu.net> * modules/fdl: New module, to install doc/fdl.texi.
--- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-07-11 12:58:27 $' +cvsdatestamp='$Date: 2006-07-11 15:27:08 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` @@ -240,8 +240,8 @@ # - libname, supplied_libname from --lib # - sourcebase from --source-base # - m4base from --m4-base +# - docbase from --doc-base # - testsbase from --tests-base -# - docbase from --doc-base # - auxdir from --aux-dir # - inctests true if --with-tests was given, blank otherwise # - avoidlist list of modules to avoid, from --avoid @@ -256,6 +256,7 @@ supplied_libname= sourcebase= m4base= + docbase= testsbase= auxdir= inctests= @@ -337,6 +338,16 @@ --m4-base=* ) m4base=`echo "X$1" | sed -e 's/^X--m4-base=//'` shift ;; + --doc-base ) + shift + if test $# = 0; then + func_fatal_error "missing argument for --doc-base" + fi + docbase=$1 + shift ;; + --doc-base=* ) + docbase=`echo "X$1" | sed -e 's/^X--doc-base=//'` + shift ;; --tests-base ) shift if test $# = 0; then @@ -347,16 +358,6 @@ --tests-base=* ) testsbase=`echo "X$1" | sed -e 's/^X--tests-base=//'` shift ;; - --doc-base ) - shift - if test $# = 0; then - func_fatal_error "missing argument for --doc-base" - fi - docbase=$1 - shift ;; - --doc-base=* ) - docbase=`echo "X$1" | sed -e 's/^X--doc-base=//'` - shift ;; --aux-dir ) shift if test $# = 0; then @@ -454,12 +455,12 @@ case "$m4base" in */ ) m4base=`echo "$m4base" | sed -e "$sed_trimtrailingslashes"` ;; esac + case "$docbase" in + */ ) docbase=`echo "$docbase" | sed -e "$sed_trimtrailingslashes"` ;; + esac case "$testsbase" in */ ) testsbase=`echo "$testsbase" | sed -e "$sed_trimtrailingslashes"` ;; esac - case "$docbase" in - */ ) docbase=`echo "$docbase" | sed -e "$sed_trimtrailingslashes"` ;; - esac case "$auxdir" in */ ) auxdir=`echo "$auxdir" | sed -e "$sed_trimtrailingslashes"` ;; esac @@ -892,8 +893,8 @@ # - libname library name # - sourcebase directory relative to destdir where to place source code # - m4base directory relative to destdir where to place *.m4 macros +# - docbase directory relative to destdir where to place doc files # - testsbase directory relative to destdir where to place unit test code -# - docbase directory relative to destdir where to place doc files # - auxdir directory relative to destdir where to place build aux files # - inctests true if --with-tests was given, blank otherwise # - avoidlist list of modules to avoid, from --avoid @@ -910,8 +911,8 @@ cached_avoidlist= cached_sourcebase= cached_m4base= + cached_docbase= cached_testsbase= - cached_docbase= cached_libname= cached_lgpl= cached_libtool= @@ -934,12 +935,12 @@ /gl_M4_BASE(/ { s,^.*gl_M4_BASE([[ ]*\([^])]*\).*$,cached_m4base="\1",p } + /gl_DOC_BASE(/ { + s,^.*gl_DOC_BASE([[ ]*\([^])]*\).*$,cached_docbase="\1",p + } /gl_TESTS_BASE(/ { s,^.*gl_TESTS_BASE([[ ]*\([^])]*\).*$,cached_testsbase="\1",p } - /gl_DOC_BASE(/ { - s,^.*gl_DOC_BASE([[ ]*\([^])]*\).*$,cached_docbase="\1",p - } /gl_LIB(/ { s,^.*gl_LIB([[ ]*\([^])]*\).*$,cached_libname="\1",p } @@ -993,6 +994,13 @@ func_fatal_error "missing --source-base option" fi fi + # The docbase defaults to the cached one. + if test -z "$docbase"; then + docbase="$cached_docbase" + if test -z "$docbase"; then + func_fatal_error "missing --doc-base option" + fi + fi # The testsbase defaults to the cached one. if test -z "$testsbase"; then testsbase="$cached_testsbase" @@ -1000,13 +1008,6 @@ func_fatal_error "missing --tests-base option" fi fi - # The docbase defaults to the cached one. - if test -z "$docbase"; then - docbase="$cached_docbase" - if test -z "$docbase"; then - func_fatal_error "missing --doc-base option" - fi - fi # The libname defaults to the cached one. if test -z "$supplied_libname"; then libname="$cached_libname" @@ -1089,6 +1090,14 @@ echo "Create directory $destdir/$m4base" fi fi + if test ! -d "$destdir/$docbase"; then + if $doit; then + echo "Creating directory $destdir/$docbase" + mkdir "$destdir/$docbase" || func_fatal_error "failed" + else + echo "Create directory $destdir/$docbase" + fi + fi if test -n "$inctests"; then if test ! -d "$destdir/$testsbase"; then if $doit; then @@ -1099,14 +1108,6 @@ fi fi fi - if test ! -d "$destdir/$docbase"; then - if $doit; then - echo "Creating directory $destdir/$docbase" - mkdir "$destdir/$docbase" || func_fatal_error "failed" - else - echo "Create directory $destdir/$docbase" - fi - fi if test ! -d "$destdir/$auxdir"; then if $doit; then echo "Creating directory $destdir/$auxdir" @@ -1324,8 +1325,8 @@ echo "gl_AVOID([$avoidlist])" echo "gl_SOURCE_BASE([$sourcebase])" echo "gl_M4_BASE([$m4base])" + echo "gl_DOC_BASE([$docbase])" echo "gl_TESTS_BASE([$testsbase])" - echo "gl_DOC_BASE([$docbase])" echo "gl_LIB([$libname])" test -z "$lgpl" || echo "gl_LGPL" test -z "$libtool" || echo "gl_LIBTOOL" @@ -1905,8 +1906,8 @@ # First use of gnulib in the given m4base. test -n "$supplied_libname" || supplied_libname=true test -n "$sourcebase" || sourcebase="lib" + test -n "$docbase" || docbase="doc" test -n "$testsbase" || testsbase="tests" - test -n "$docbase" || docbase="doc" test -n "$macro_prefix" || macro_prefix="gl" fi func_import "$*" @@ -1945,8 +1946,8 @@ test -n "$supplied_libname" || supplied_libname=true test -n "$sourcebase" || sourcebase="lib" m4base="m4" + test -n "$docbase" || docbase="doc" test -n "$testsbase" || testsbase="tests" - test -n "$docbase" || docbase="doc" test -n "$macro_prefix" || macro_prefix="gl" func_import "$*" else