# -*- python -*-
# Copyright (C) 2003, Charles Wang.
# Author:  Charles Wang <charles@linux.net.cn>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANT; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public LIcense for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA.
# -*- python -*-
import os
import sys
import string
Import('*')

##### Construct the tar.gz which needed by rootfs.
## include: 
#           #bindir/root.step1.tar.gz
#           #bindir/root.bootscripts.tar.gz
#           #bindir/kmodules-x.xx.xx.tar.bz2
#           #bindir/mi-vmlinuz-x.xx.xx  (needed by iso)

if DEF_ROOTFS == 'root.magic1' and TARGET_BUILD_VARIANT == 'eng':
    if 'root.step1' in COMMAND_LINE_TARGETS:
        ## TARGET: root.step1
        SConscript('root.magic1/SConscript')

if DEF_ROOTFS == 'root.magic1':
    ## TARGET: root.bootscripts
    SConscript('bootscripts.magic1/SConscript')

if DEF_ROOTFS == 'root.arch1' and TARGET_BUILD_VARIANT == 'eng':
    if 'root.step1' in COMMAND_LINE_TARGETS:
        ## TARGET: root.step1
        SConscript('root.arch1/SConscript')

if DEF_ROOTFS == 'root.arch1':
    ## TARGET: root.bootscripts
    SConscript('bootscripts.arch1/SConscript')

## TARGET: busybox.bin
#SConscript('busybox/SConscript')

## TARGET: 'parted.bin'
#SConscript('parted/SConscript')

## TARGET: 'kernel.copy'
#SConscript('kernel_copy/SConscript')

## TARGET: 'kernel.build'
#SConscript('kernel_build/SConscript')
