tazwok rev 465 4.3
Improve config.site and remove path config from tazwok.conf (actually change theses paths doesn't works well)
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Mar 27 18:13:31 2011 +0200 (2011-03-27) |
parents | ad725c56d2e1 |
children | d25917659cbe |
files | examples/config.site examples/tazwok.conf tazwok |
line diff
1.1 --- a/examples/config.site Fri Mar 25 18:58:49 2011 +0100 1.2 +++ b/examples/config.site Sun Mar 27 18:13:31 2011 +0200 1.3 @@ -14,16 +14,26 @@ 1.4 # tazwok does that work before executing compile rules. 1.5 # 1.6 # If you want to use your own config.site, you can use : 1.7 -# export CONFIG_SITE=path_to_my_config.site 1.8 -# in the compilation_rules of a receipt. 1.9 +# export CONFIG_SITE=path_to_my_config.site in header declarations of 1.10 +# a receipt. 1.11 +# 1.12 # It can be useful if you want to share a default configuration between 1.13 # some groups of packages like GNOME or KDE ones. 1.14 # 1.15 -# To make tazwok configuration easier, we use variables from 1.16 -# /etc/tazwok.conf here. Note this only concerns configure options : 1.17 -# make flags (MAKEFLAGS, CFLAGS, CXXFLAGS and DESTDIR) are exported 1.18 -# to environment variables; options set here are those we can't 1.19 -# export environnment variables to because they don't work. 1.20 + 1.21 +#Default pathes. 1.22 +default_prefix=/usr 1.23 +default_libdir=/usr/lib 1.24 +default_datarootdir=$default_prefix/share 1.25 +default_datadir=$default_datarootdir 1.26 +default_localedir=$default_datarootdir/locale 1.27 +default_infodir=$default_datarootdir/info 1.28 +default_mandir=$default_datarootdir/man 1.29 +default_sysconfigdir=/etc 1.30 +default_localstatedir=/var 1.31 +default_build="$BUILD_HOST" 1.32 +default_host="$BUILD_HOST" 1.33 + 1.34 1.35 # Some variable are prefixed by "${prefix}" instead of "${datarootdir}". 1.36 # For those cases we use "${datadir}" because the configure script 1.37 @@ -40,21 +50,27 @@ 1.38 1.39 # Use default values if one of these configure variables is not set. 1.40 { [ "$prefix" = NONE ] || [ ! "$prefix" ] ; } && prefix=$default_prefix 1.41 +{ [ "$libdir" = NONE ] || [ ! "$libdir" ] ; } && libdir=$default_libdir 1.42 { [ "$datarootdir" = NONE ] || [ ! "$datarootdir" ] ; } && datarootdir=$default_datarootdir 1.43 -{ [ "$datadir" = NONE ] || [ ! "$datadir" ] ; } && datadir=$datarootdir 1.44 +{ [ "$datadir" = NONE ] || [ ! "$datadir" ] ; } && datadir=$default_datadir 1.45 { [ "$localedir" = NONE ] || [ ! "$localedir" ] ; } && localedir=$default_localedir 1.46 { [ "$infodir" = NONE ] || [ ! "$infodir" ] ; } && infodir=$default_infodir 1.47 { [ "$mandir" = NONE ] || [ ! "$mandir" ] ; } && mandir=$default_mandir 1.48 +{ [ "$sysconfigdir" = NONE ] || [ ! "$sysconfigdir" ] ; } && sysconfigdir=$default_sysconfigdir 1.49 +{ [ "$localstatedir" = NONE ] || [ ! "$localstatedir" ] ; } && localstatedir=$default_localstatedir 1.50 { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build 1.51 { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host 1.52 1.53 # Print information about these variables. 1.54 echo "prefix = $prefix 1.55 +libdir = $libdir 1.56 datarootdir = $datarootdir 1.57 datadir = $datadir 1.58 localedir= $localedir 1.59 infodir = $infodir 1.60 mandir = $mandir 1.61 +sysconfigdir = $sysconfigdir 1.62 +localstatedir = $localstatedir 1.63 build = $build 1.64 host = $host 1.65 "
2.1 --- a/examples/tazwok.conf Fri Mar 25 18:58:49 2011 +0100 2.2 +++ b/examples/tazwok.conf Sun Mar 27 18:13:31 2011 +0200 2.3 @@ -62,15 +62,6 @@ 2.4 # Default tool prefix. 2.5 TOOLPREFIX="${BUILD_HOST}-" 2.6 2.7 -# Default arguments for GNU configure. 2.8 -default_prefix=/usr 2.9 -default_datarootdir=$default_prefix/share 2.10 -default_datadir=$default_datarootdir 2.11 -default_localedir=$default_datarootdir/locale 2.12 -default_infodir=$default_datarootdir/info 2.13 -default_mandir=$default_datarootdir/man 2.14 -default_build="$BUILD_HOST" 2.15 -default_host="$BUILD_HOST" 2.16 # CONFIGURE_ARGS is here only for backward compatibility. 2.17 CONFIGURE_ARGS="--build=$BUILD_HOST --host=$BUILD_HOST" 2.18
3.1 --- a/tazwok Fri Mar 25 18:58:49 2011 +0100 3.2 +++ b/tazwok Sun Mar 27 18:13:31 2011 +0200 3.3 @@ -726,15 +726,17 @@ 3.4 default_infodir default_mandir default_build default_host 3.5 local LC_ALL=POSIX LANG=POSIX 3.6 compile_rules 3.7 + return_code=$? 3.8 3.9 - # Check if config.site has been used. 3.10 - # /!\ disabled since it screws the return_code of the step. 3.11 - #if [ -f /tmp/config.site ]; then 3.12 - # rm /tmp/config.site 3.13 - #else 3.14 - # tazwok_warning "config.site hasn't been used during \ 3.15 -#the configuration process." 3.16 - #fi 3.17 + if [ -f /tmp/config.site ]; then 3.18 + rm /tmp/config.site 3.19 + else 3.20 + tazwok_warning "config.site hasn't been used during \ 3.21 +the configuration process." 3.22 + fi 3.23 + 3.24 + # Return the proper status to step. 3.25 + (exit $return_code) 3.26 report end-step 3.27 fi 3.28 }