mirror of git://sourceware.org/git/glibc.git
[versioning=yes]: Build the mapfiles with a pattern rule that lists all of them as targets. (sysd-versions): Depend only on Versions.def. Write a Makefile fragment that defines $(vers-libs) based on contents of that file; then include it. (lib-noranlib): Depend on lib-mapfiles not sysd-versions. (lib-mapfiles): New target, depends on sysd-versions and $(vers-libs). Predicate all this on avoid-generated unset as well as versioning.
This commit is contained in:
parent
220733f52a
commit
6ef9f70bdb
24
Makefile
24
Makefile
|
@ -78,7 +78,7 @@ install-others += $(inst_includedir)/gnu/lib-names.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(versioning),yes)
|
ifeq ($(versioning),yes)
|
||||||
lib-noranlib: $(common-objpfx)sysd-versions
|
lib-noranlib: lib-mapfiles
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include Makerules
|
include Makerules
|
||||||
|
@ -318,10 +318,22 @@ remove-old-headers:
|
||||||
|
|
||||||
# Generate version maps.
|
# Generate version maps.
|
||||||
ifeq ($(versioning),yes)
|
ifeq ($(versioning),yes)
|
||||||
$(common-objpfx)sysd-versions: versions.awk \
|
ifndef avoid-generated
|
||||||
$(wildcard $(all-subdirs:%=%/Versions)) \
|
$(common-objpfx)sysd-versions: Versions.def
|
||||||
$(wildcard $(+sysdep_dirs:%=%/Versions))
|
(echo define vers-libs; \
|
||||||
|
sed -n 's/\(lib[a-zA-Z0-9_][a-zA-Z0-9_]*\) {/$$(common-objpfx)\1%map/p' $<; \
|
||||||
|
echo endef) > $@T
|
||||||
|
mv -f $@T $@
|
||||||
|
-include $(common-objpfx)sysd-versions
|
||||||
|
vers-libs := $(subst $(\n), ,$(vers-libs))
|
||||||
|
|
||||||
|
$(vers-libs): versions.awk \
|
||||||
|
$(wildcard $(subdirs:%=%/Versions)) \
|
||||||
|
$(wildcard $(+sysdep_dirs:%=%/Versions))
|
||||||
$(AWK) -v 'buildroot=$(common-objpfx)' -f $^
|
$(AWK) -v 'buildroot=$(common-objpfx)' -f $^
|
||||||
rm -f $@
|
|
||||||
echo > $@
|
lib-mapfiles: $(common-objpfx)sysd-versions $(subst %,.,$(vers-libs))
|
||||||
|
else
|
||||||
|
lib-mapfiles:
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue