debug/gdb: install dependable libs in a generic target static libs dir
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Aug 23 14:32:16 2010 +0200 (2010-08-23)
changeset 2100f9fcfc002c8a
parent 2099 1bb063c8a0ca
child 2101 f27cfe7ed56d
debug/gdb: install dependable libs in a generic target static libs dir

For now, ncurses is the only dependable target library built for gdb.
But expat is coming, and there's no reason to install each library in
its own place.

So, install ncurses in a generic directory, where other dependable
libraries can be installed as well.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/debug/300-gdb.sh
     1.1 --- a/scripts/build/debug/300-gdb.sh	Mon Aug 23 23:18:49 2010 +0200
     1.2 +++ b/scripts/build/debug/300-gdb.sh	Mon Aug 23 14:32:16 2010 +0200
     1.3 @@ -119,9 +119,12 @@
     1.4      if [ "${CT_GDB_NATIVE}" = "y" ]; then
     1.5          local -a native_extra_config
     1.6          local -a ncurses_opt
     1.7 +        local -a gdb_native_CFLAGS
     1.8  
     1.9          CT_DoStep INFO "Installing native gdb"
    1.10  
    1.11 +        native_extra_config=("${extra_config[@]}")
    1.12 +
    1.13          # GDB on Mingw depends on PDcurses, not ncurses
    1.14          if [ "${do_ncurses}" = "y" ]; then
    1.15              CT_DoLog EXTRA "Building static target ncurses"
    1.16 @@ -167,7 +170,7 @@
    1.17                  --with-build-cc=${CT_BUILD}-gcc                                 \
    1.18                  --with-build-cpp=${CT_BUILD}-gcc                                \
    1.19                  --with-build-cflags="${CT_CFLAGS_FOR_HOST}"                     \
    1.20 -                --prefix="${CT_BUILD_DIR}/ncurses"                              \
    1.21 +                --prefix="${CT_BUILD_DIR}/static-target"                        \
    1.22                  --without-shared                                                \
    1.23                  --without-sysmouse                                              \
    1.24                  --without-progs                                                 \
    1.25 @@ -180,6 +183,11 @@
    1.26  
    1.27              # We no longer need the temporary tic. Remove it
    1.28              CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/buildtools/tic${tic_ext}"
    1.29 +
    1.30 +            native_extra_config+=("--with-curses")
    1.31 +            # There's no better way to tell gdb where to find -lcurses... :-(
    1.32 +            gdb_native_CFLAGS+=("-I${CT_BUILD_DIR}/static-target/include")
    1.33 +            gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib")
    1.34          fi # do_ncurses
    1.35  
    1.36          CT_DoLog EXTRA "Configuring native gdb"
    1.37 @@ -187,7 +195,6 @@
    1.38          mkdir -p "${CT_BUILD_DIR}/build-gdb-native"
    1.39          cd "${CT_BUILD_DIR}/build-gdb-native"
    1.40  
    1.41 -        native_extra_config=("${extra_config[@]}")
    1.42          case "${CT_THREADS}" in
    1.43              none)   native_extra_config+=("--disable-threads");;
    1.44              *)      native_extra_config+=("--enable-threads");;
    1.45 @@ -203,13 +210,11 @@
    1.46  
    1.47          export ac_cv_func_strncmp_works=yes
    1.48  
    1.49 -        gdb_native_CFLAGS="-I${CT_BUILD_DIR}/ncurses/include -L${CT_BUILD_DIR}/ncurses/lib"
    1.50 -
    1.51          CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'"
    1.52  
    1.53          CC="${CC_for_gdb}"                              \
    1.54          LD="${LD_for_gdb}"                              \
    1.55 -        CFLAGS="${gdb_native_CFLAGS}"                   \
    1.56 +        CFLAGS="${gdb_native_CFLAGS[@]}"                \
    1.57          CT_DoExecLog ALL                                \
    1.58          "${gdb_src_dir}/configure"                      \
    1.59              --build=${CT_BUILD}                         \