scripts/build/kernel/mingw32.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Jan 28 22:06:49 2011 +0100 (2011-01-28)
changeset 2284 7ede374110e5
parent 2017 f637b6c2162b
child 2580 46dd211a7fd5
permissions -rw-r--r--
config: add an option not to remove the destination directory

In certain circumstances, removing the destination/installation directory
is a bad idea. For example, when the build environment is already taking
care of sanitising the build tree, and pre-installs stuff in there, it is
a very bad idea to remove the destination directory.

This happens now in buildroot, as the crostool-NG backend now installs the
toolchain in the common host-tools directory, and pre-install there a few
host-utilities (eg. host-automake and host-gawk).

Provide a config knob to turn on/off the removal of the destination
directory, defaulting to 'y' (previous behavior), and forced to 'n' when
used as a backend.

Reported-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
bartvdrmeulen@2017
     1
# This file declares functions to install the kernel headers for mingw
bartvdrmeulen@2017
     2
# Copyright 2009 Bart vdr. Meulen
bartvdrmeulen@2017
     3
# Licensed under the GPL v2. See COPYING in the root of this package
bartvdrmeulen@2017
     4
bartvdrmeulen@2017
     5
CT_DoKernelTupleValues() {
bartvdrmeulen@2017
     6
    CT_TARGET_KERNEL="mingw32"
bartvdrmeulen@2017
     7
    CT_TARGET_SYS=
bartvdrmeulen@2017
     8
}
bartvdrmeulen@2017
     9
bartvdrmeulen@2017
    10
do_kernel_get() {
bartvdrmeulen@2017
    11
    CT_GetFile "w32api-${CT_W32API_VERSION}-mingw32-src" \
bartvdrmeulen@2017
    12
        http://downloads.sourceforge.net/sourceforge/mingw
bartvdrmeulen@2017
    13
}
bartvdrmeulen@2017
    14
bartvdrmeulen@2017
    15
do_kernel_extract() {
bartvdrmeulen@2017
    16
    CT_Extract "w32api-${CT_W32API_VERSION}-mingw32-src"
bartvdrmeulen@2017
    17
}
bartvdrmeulen@2017
    18
bartvdrmeulen@2017
    19
do_kernel_headers() {
bartvdrmeulen@2017
    20
    CT_DoStep INFO "Installing kernel headers"
bartvdrmeulen@2017
    21
eha@2084
    22
    mkdir -p "${CT_HEADERS_DIR}"
eha@2084
    23
    cp -r ${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/include/* \
eha@2084
    24
          ${CT_HEADERS_DIR}
bartvdrmeulen@2017
    25
bartvdrmeulen@2017
    26
    CT_EndStep
bartvdrmeulen@2017
    27
}