mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Optimized extracting the classes in the framework ... do not pipe through
awk, which is slow - rather use a set of sed commands git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@14720 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1439b7636f
commit
46995b9418
1 changed files with 8 additions and 1 deletions
|
@ -184,11 +184,18 @@ OBJC_OBJ_FILES_TO_INSPECT = $(OBJC_OBJ_FILES) $(SUBPROJECT_OBJ_FILES)
|
|||
# __objc_class_name_XXX which is not 'U' (which would be a reference
|
||||
# to a class implemented elsewhere), it must be a class implemented in
|
||||
# this module.
|
||||
#
|
||||
# The 'sed' command parses a set of lines, and extracts lines starting
|
||||
# with __objc_class_name_XXXX Y, where XXXX is a string of characters
|
||||
# from A-Za-z_. and Y is not 'U'. It then replaces the whole line
|
||||
# with XXXX, and prints the result. '-n' disables automatic printing
|
||||
# for portability, so we are sure we only print what we want on all
|
||||
# platforms.
|
||||
$(DUMMY_FRAMEWORK_FILE): $(DERIVED_SOURCES) $(OBJ_FILES_TO_LINK) GNUmakefile
|
||||
@ classes=""; \
|
||||
for f in $(OBJC_OBJ_FILES_TO_INSPECT) __dummy__; do \
|
||||
if [ "$$f" != "__dummy__" ]; then \
|
||||
sym=`nm -Pg $$f | awk '/__objc_class_name_/ {if($$2 != "U") print $$1}' | sed 's/__objc_class_name_//'`; \
|
||||
sym=`nm -Pg $$f | sed -n -e '/^__objc_class_name_[A-Za-z_.]* [^U]/ {s/^__objc_class_name_\([A-Za-z_.]*\) [^U].*/\1/p;}'`; \
|
||||
classes="$$classes $$sym"; \
|
||||
fi; \
|
||||
done; \
|
||||
|
|
Loading…
Reference in a new issue