Changeset 2491 in kBuild
- Timestamp:
- Jul 22, 2011 11:17:10 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r2488 r2491 746 746 # Similar to firstword, except it returns the value of first defined variable. 747 747 # @param $1 list of variables to probe. 748 define FIRST-DEFINED-VAR 749 if "$1" != "" 750 local var := $(word 1,$1) 751 ifdef $(var) 752 local .RETURN := $(strip $($(var))) 748 if1of ($(KMK_FEATURES), firstdefined) 749 define FIRST-DEFINED-VAR 750 local .RETURN := $(strip $(firstdefined $1, value)) 751 endef 752 else 753 define FIRST-DEFINED-VAR 754 if "$1" != "" 755 local var := $(word 1,$1) 756 ifdef $(var) 757 local .RETURN := $(strip $($(var))) 758 else 759 local .RETURN := $(evalcall FIRST-DEFINED-VAR, $(wordlist 2,32,$1)) 760 endif 753 761 else 754 local .RETURN := $(evalcall FIRST-DEFINED-VAR, $(wordlist 2,32,$1))762 local .RETURN := 755 763 endif 756 else 757 local .RETURN := 758 endif 759 endef 764 endef 765 endif 760 766 761 767 ## Figure out where to put object files.
Note:
See TracChangeset
for help on using the changeset viewer.