mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 14:20:50 +00:00
adopt rfm's combined sed that works across runtimes
This commit is contained in:
parent
29d6accada
commit
a3bed018c1
1 changed files with 5 additions and 18 deletions
23
target.make
23
target.make
|
@ -157,27 +157,14 @@ endif
|
|||
# for portability, so we are sure we only print what we want on all
|
||||
# platforms.
|
||||
|
||||
USING_GNUSTEP_RUNTIME_VERSION_GTE_2_0 := false
|
||||
ifdef RUNTIME_VERSION
|
||||
RUNTIME_VERSION_NUMBER :=$(shell echo $(RUNTIME_VERSION) | cut -f2 -d"-")
|
||||
RUNTIME_VERSION_MAJOR := $(shell echo $(RUNTIME_VERSION_NUMBER) | cut -f1 -d.)
|
||||
RUNTIME_VERSION_MINOR := $(shell echo $(RUNTIME_VERSION_NUMBER) | cut -f2 -d.)
|
||||
RUNTIME_VERSION_GTE_2_0 := $(shell [ $(RUNTIME_VERSION_MAJOR) -gt 2 -o $(RUNTIME_VERSION_MAJOR) -eq 2 ] && echo true)
|
||||
ifeq ($(findstring gnustep,$(RUNTIME_VERSION)), gnustep)
|
||||
ifeq ($(RUNTIME_VERSION_GTE_2_0), true)
|
||||
USING_GNUSTEP_RUNTIME_VERSION_GTE_2_0 := true
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# NB. With the gnustep-2.0 ABI the class name prefix is ._OBJC_CLASS_
|
||||
# rather than __objc_class_name_ so we search for either.
|
||||
#
|
||||
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -Pg $$object_file | sed -n -e '/^__objc_class_name_[A-Za-z0-9_.]* [^U]/ {s/^__objc_class_name_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}' -e '/^\._OBJC_CLASS_[A-Za-z0-9_.]* [^U]/ {s/^\._OBJC_CLASS_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}'
|
||||
|
||||
|
||||
ifeq ($(USING_GNUSTEP_RUNTIME_VERSION_GTE_2_0),true)
|
||||
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -Pg $$object_file | sed -n -e '/^._OBJC_CLASS_[A-Za-z0-9_.]* [^U]/ {s/^._OBJC_CLASS_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}'
|
||||
else
|
||||
EXTRACT_CLASS_NAMES_COMMAND = $(NM) -Pg $$object_file | sed -n -e '/^__objc_class_name_[A-Za-z0-9_.]* [^U]/ {s/^__objc_class_name_\([A-Za-z0-9_.]*\) [^U].*/\1/p;}'
|
||||
endif
|
||||
|
||||
#
|
||||
# This is the generic version - if the target is not in the following list,
|
||||
# this setup will be used. It the target does not override variables here
|
||||
|
|
Loading…
Reference in a new issue