build-scripts/fatbuild.sh
changeset 5611 d20007078cd1
parent 5609 3619f9bc639a
child 5961 3bd7ed5f3895
equal deleted inserted replaced
5609:3619f9bc639a 5611:d20007078cd1
    78 cd $srcdir
    78 cd $srcdir
    79 
    79 
    80 #
    80 #
    81 # Figure out which phase to build:
    81 # Figure out which phase to build:
    82 # all,
    82 # all,
    83 # configure, configure-ppc, configure-ppc64, configure-x86, configure-x64
    83 # configure, configure-x86, configure-x64
    84 # make, make-ppc, make-ppc64, make-x86, make-x64, merge
    84 # make, make-x86, make-x64, merge
    85 # install
    85 # install
    86 # clean
    86 # clean
    87 if test x"$1" = x; then
    87 if test x"$1" = x; then
    88     phase=all
    88     phase=all
    89 else
    89 else
    90     phase="$1"
    90     phase="$1"
    91 fi
    91 fi
    92 case $phase in
    92 case $phase in
    93     all)
    93     all)
    94         configure_ppc="yes"
       
    95         configure_ppc64="yes"
       
    96         configure_x86="yes"
    94         configure_x86="yes"
    97         configure_x64="yes"
    95         configure_x64="yes"
    98         make_ppc="yes"
       
    99         make_ppc64="yes"
       
   100         make_x86="yes"
    96         make_x86="yes"
   101         make_x64="yes"
    97         make_x64="yes"
   102         merge="yes"
    98         merge="yes"
   103         ;;
    99         ;;
   104     configure)
   100     configure)
   105         configure_ppc="yes"
       
   106         configure_ppc64="yes"
       
   107         configure_x86="yes"
   101         configure_x86="yes"
   108         configure_x64="yes"
   102         configure_x64="yes"
   109         ;;
   103         ;;
   110     configure-ppc)
       
   111         configure_ppc="yes"
       
   112         ;;
       
   113     configure-ppc64)
       
   114         configure_ppc64="yes"
       
   115         ;;
       
   116     configure-x86)
   104     configure-x86)
   117         configure_x86="yes"
   105         configure_x86="yes"
   118         ;;
   106         ;;
   119     configure-x64)
   107     configure-x64)
   120         configure_x64="yes"
   108         configure_x64="yes"
   121         ;;
   109         ;;
   122     make)
   110     make)
   123         make_ppc="yes"
       
   124         make_ppc64="yes"
       
   125         make_x86="yes"
   111         make_x86="yes"
   126         make_x64="yes"
   112         make_x64="yes"
   127         merge="yes"
   113         merge="yes"
   128         ;;
       
   129     make-ppc)
       
   130         make_ppc="yes"
       
   131         ;;
       
   132     make-ppc64)
       
   133         make_ppc64="yes"
       
   134         ;;
   114         ;;
   135     make-x86)
   115     make-x86)
   136         make_x86="yes"
   116         make_x86="yes"
   137         ;;
   117         ;;
   138     make-x64)
   118     make-x64)
   162         ;;
   142         ;;
   163     install-man)
   143     install-man)
   164         install_man="yes"
   144         install_man="yes"
   165         ;;
   145         ;;
   166     clean)
   146     clean)
   167         clean_ppc="yes"
       
   168         clean_ppc64="yes"
       
   169         clean_x86="yes"
   147         clean_x86="yes"
   170         clean_x64="yes"
   148         clean_x64="yes"
   171         ;;
   149         ;;
   172     clean-ppc)
       
   173         clean_ppc="yes"
       
   174         ;;
       
   175     clean-ppc64)
       
   176         clean_ppc64="yes"
       
   177         ;;
       
   178     clean-x86)
   150     clean-x86)
   179         clean_x86="yes"
   151         clean_x86="yes"
   180         ;;
   152         ;;
   181     clean-x64)
   153     clean-x64)
   182         clean_x64="yes"
   154         clean_x64="yes"
   183         ;;
   155         ;;
   184     *)
   156     *)
   185         echo "Usage: $0 [all|configure[-ppc|-ppc64|-x86|-x64]|make[-ppc|-ppc64|-x86|-x64]|merge|install|clean[-ppc|-ppc64|-x86|-x64]]"
   157         echo "Usage: $0 [all|configure[-x86|-x64]|make[-x86|-x64]|merge|install|clean[-x86|-x64]]"
   186         exit 1
   158         exit 1
   187         ;;
   159         ;;
   188 esac
   160 esac
   189 case `uname -p` in
   161 case `uname -p` in
   190     powerpc)
       
   191         native_path=ppc
       
   192         ;;
       
   193     powerpc64)
       
   194         native_path=ppc64
       
   195         ;;
       
   196     *86)
   162     *86)
   197         native_path=x86
   163         native_path=x86
   198         ;;
   164         ;;
   199     x86_64)
   165     x86_64)
   200         native_path=x64
   166         native_path=x64
   206 esac
   172 esac
   207 
   173 
   208 #
   174 #
   209 # Create the build directories
   175 # Create the build directories
   210 #
   176 #
   211 for dir in build build/ppc build/ppc64 build/x86 build/x64; do
   177 for dir in build build/x86 build/x64; do
   212     if test -d $dir; then
   178     if test -d $dir; then
   213         :
   179         :
   214     else
   180     else
   215         mkdir $dir || exit 1
   181         mkdir $dir || exit 1
   216     fi
   182     fi
   326     $* || exit 6
   292     $* || exit 6
   327 }
   293 }
   328 if test x$clean_x86 = xyes; then
   294 if test x$clean_x86 = xyes; then
   329     do_clean rm -r build/x86
   295     do_clean rm -r build/x86
   330 fi
   296 fi
   331 if test x$clean_ppc = xyes; then
   297 if test x$clean_x64 = xyes; then
   332     do_clean rm -r build/ppc
   298     do_clean rm -r build/x64
   333 fi
   299 fi
   334