Changeset 2223 in kBuild
- Timestamp:
- Jan 8, 2009 1:10:56 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r2182 r2223 5 5 6 6 # 7 # Copyright (c) 2004-200 8knut st. osmundsen <[email protected]>7 # Copyright (c) 2004-2009 knut st. osmundsen <[email protected]> 8 8 # 9 9 # This file is part of kBuild. … … 670 670 TARGET_PATH = $(PATH_TARGET)/$(1) 671 671 672 ## 673 # Checks if the specified short option ($1) is found in the flags ($2), 674 # assuming getopt style options. 675 # 676 # @returns $3 if present, $4 not. 677 # 678 # @param $1 The option (single char!). 679 # @param $2 The option arguments. 680 # @param $3 Eval and return if present. 681 # @param $4 Eval and return if not present. 682 # 683 # @todo May confuse option values starting with '-' for options. 684 # @remarks Invoke like this: $(evalcall KB_FN_OPT_TEST_SHORT,d,$(flags),present,not-present) 685 # 686 define KB_FN_OPT_TEST_SHORT 687 local options := $(translate $(strip $(filter -%,$(filter-out --%,$2))),$(SP)-,) 688 local .RETURN := $(if-expr $(pos $1,$(options)) != 0,$3,$4) 689 endef 690 691 ## 692 # Checks if the specified long option ($1) is found in the flags ($2), 693 # assuming getopt style options. 694 # 695 # @returns $3 if present, $4 not. 696 # 697 # @param $1 The long option, dashes included. No % chars. 698 # @param $2 The option arguments. 699 # @param $3 Eval and return if present. 700 # @param $4 Eval and return if not present. 701 # 702 # @todo May confuse option values starting with '--' for options. 703 # @remarks Invoke like this: $(evalcall KBFN_OPT_TEST_SHORT,--defined,$(flags),present,not-present) 704 # 705 define KB_FN_OPT_TEST_LONG 706 local options := $(filter-out =delete=%,$(subst :, =delete=,$(subst =, =delete=,$2))) 707 local .RETURN := $(if-expr "$(filter $1,$(options))" != "",$3,$4) 708 endef 709 710 ## 711 # Checks if the specified short ($1) or long ($2) option is found in the flags ($2), 712 # assuming getopt style options. 713 # 714 # @returns $4 if present, $5 not. 715 # 716 # @param $1 The short option (single char!). 717 # @param $2 The long option, dashes included. No % chars. 718 # @param $3 The option arguments. 719 # @param $4 Eval and return if present. 720 # @param $5 Eval and return if not present. 721 # 722 # @todo May confuse option values starting with '--' for options. 723 # @remarks Invoke like this: $(evalcall KB_FN_OPT_TEST_SHORT_LONG,d,--defined,$(flags),present,not-present) 724 # 725 define KB_FN_OPT_TEST_SHORT_LONG 726 local short_options := $(translate $(strip $(filter -%,$(filter-out --%,$3))),$(SP)-,) 727 local long_options := $(filter-out =delete=%,$(subst :, =delete=,$(subst =, =delete=,$3))) 728 local .RETURN := $(if-expr $(pos $1,$(short_options)) != 0 || "$(filter $2,$(long_options))" != "",$4,$5) 729 endef 730 731 672 732 673 733 # … … 725 785 ## PROPS_TOOLS 726 786 # This is a subset of PROPS_SINGLE. 727 PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL ARTOOL LDTOOL LEXTOOLFETCHTOOL UNPACKTOOL PATCHTOOL787 PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL 728 788 729 789 ## PROPS_SINGLE
Note:
See TracChangeset
for help on using the changeset viewer.