Add an option to remove the generated documentation.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Mar 07 19:00:10 2007 +0000 (2007-03-07)
changeset 1411726b835286
parent 13 068dce39f687
child 15 99f12637cdf0
Add an option to remove the generated documentation.
(After an idea from Enrico Weigelt <weigelt@metux.de>).
config/global.in
scripts/crosstool.sh
     1.1 --- a/config/global.in	Sun Mar 04 22:56:04 2007 +0000
     1.2 +++ b/config/global.in	Wed Mar 07 19:00:10 2007 +0000
     1.3 @@ -126,6 +126,14 @@
     1.4      help
     1.5        Enter the custom patch directory here.
     1.6  
     1.7 +config REMOVE_DOCS
     1.8 +    bool
     1.9 +    prompt "Remove documentation"
    1.10 +    default n
    1.11 +    help
    1.12 +      Remove the installed documentation (man and info pages).
    1.13 +      Gains around 8MiB for a uClibc-based, C and C++ compiler.
    1.14 +
    1.15  comment "Downloading and extracting"
    1.16  
    1.17  config NO_DOWNLOAD
     2.1 --- a/scripts/crosstool.sh	Sun Mar 04 22:56:04 2007 +0000
     2.2 +++ b/scripts/crosstool.sh	Wed Mar 07 19:00:10 2007 +0000
     2.3 @@ -258,6 +258,11 @@
     2.4      CT_Popd
     2.5  fi
     2.6  
     2.7 +if [ "${CT_REMOVE_DOCS}" = "y" ]; then
     2.8 +	CT_DoLog INFO "Removing installed documentation"
     2.9 +    rm -rf "${CT_PREFIX_DIR}/"{man,info}
    2.10 +fi
    2.11 +
    2.12  CT_STOP_DATE=`CT_DoDate +%s%N`
    2.13  CT_STOP_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
    2.14  CT_DoLog INFO "Build completed at ${CT_STOP_DATE_HUMAN}"