Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/xcw/bin/helenos-bld-config

    r3875f106 ra5c468e  
    11#!/bin/bash
    22#
    3 # Copyright (c) 2015 Jiri Svoboda
     3# Copyright (c) 2018 Jiri Svoboda
    44# All rights reserved.
    55#
     
    3535MAKEFILE_COMMON="$SRC_ROOT"/Makefile.common
    3636MAKEFILE_CONFIG="$SRC_ROOT"/Makefile.config
     37CONFIG_MK="$SRC_ROOT"/uspace/export/config.mk
    3738
    3839# Extract simple 'name = value' variable definition from Makefile
     
    4243        file_name="$2"
    4344
    44         sed -n "s/^$field_name = \\(.*\\)$/\\1/p" "$file_name"
     45        sed -n "s/^$field_name \\{0,1\\}= \\{0,1\\}\\(.*\\)$/\\1/p" "$file_name" | \
     46            sed "s/^\"//" | sed "s/\"$//"
    4547}
    4648
     
    5456        echo "__${ENDIAN}__"
    5557        ;;
     58*.--cflags) extract_field "HELENOS_CFLAGS" "$CONFIG_MK";;
     59*.--ldflags) extract_field "HELENOS_LDFLAGS" "$CONFIG_MK";;
    5660(*)
    5761        echo "Unknown option $1" >&2
Note: See TracChangeset for help on using the changeset viewer.