aboutsummaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-19 23:33:48 +0000
committerRoland McGrath <roland@gnu.org>2000-03-19 23:33:48 +0000
commitba7e89ec3321d67584eea5857853309846a73806 (patch)
tree3e3376be6e9adf8680fc47b24878d39a971b6a77 /Makeconfig
parent6b3c3a3525b6571c546a8a9aad8f3a53a055dc2a (diff)
downloadglibc-ba7e89ec3321d67584eea5857853309846a73806.zip
glibc-ba7e89ec3321d67584eea5857853309846a73806.tar.gz
glibc-ba7e89ec3321d67584eea5857853309846a73806.tar.bz2
* Makeconfig (soversions.i): New target, input-reading parts of
soversions.mk generation moved here; result is a canonicalized list "LIB VERSION [SET]" for this configuration. (soversions.mk): Use that as input. Don't emit map-firstversions. * Makerules (version-renames.def): New target, generated from soversions.i with contents that was in $(map-firstversions). (Versions.all): Don't depend on soversions.mk, depend on version-renames.def instead; just cat it into the input.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig56
1 files changed, 26 insertions, 30 deletions
diff --git a/Makeconfig b/Makeconfig
index 14a690d..32f67cf 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -676,36 +676,32 @@ ifeq (yes, $(build-shared))
ifeq ($(sysd-sorted-done),t)
-include $(common-objpfx)soversions.mk
ifndef avoid-generated
-$(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
- $(wildcard $(patsubst %, $(..)%/shlib-versions,\
- $(add-ons) \
- $(subdirs))) \
- $(common-objpfx)config.make
- (file="$(wildcard $(patsubst %,$(..)%/shlib-versions,$(add-ons))) \
- $(wildcard $(patsubst %,$(..)%/shlib-versions,$(subdirs))) \
- $(..)shlib-versions"; \
- for f in $$file; do \
- sed 's/#.*$$//;s/^[ ]*%/#/' $$f \
- | $(CC) -include $(common-objpfx)config.h -E -x c - \
- | while read conf version setname; do \
- test -n "$$version" && \
- test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
- : "$$conf"` != 0 || continue; \
- lib=`echo $$version | sed 's/=.*$$//'`; \
- if eval "test -z \"\$$versioners_lib$$lib\""; then \
- eval vers_lib$${lib}=yes; \
- number=`echo $$version | sed "s/^.*=//"`; \
- case $$number in \
- [0-9]*) echo "$$lib.so-version=.$$number"; \
- echo "all-sonames+=$$lib.so\$$($$lib.so-version)";;\
- *) echo "$$lib.so-version=$$number"; \
- echo "all-sonames+=\$$($$lib.so-version)";; \
- esac; \
- test -z "$$setname" || \
- echo "map-firstversions+=$${lib}:$${setname}"; \
- fi; \
- done; \
- done;) > $@T; exit 0
+$(common-objpfx)soversions.i: $(..)shlib-versions $(..)Makeconfig \
+ $(wildcard $(patsubst %, $(..)%/shlib-versions,\
+ $(add-ons) \
+ $(subdirs))) \
+ $(common-objpfx)config.make
+ sed -e 's/#.*$$//;s/^[ ]*%/#/' \
+ $(filter-out $(..)Makeconfig $(common-objpfx)config.make,$^) \
+ | $(CC) -include $(common-objpfx)config.h -E -x c - \
+ | while read conf version setname; do \
+ test -n "$$version" && \
+ test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
+ : "$$conf"` != 0 || continue; \
+ lib=`echo $$version | sed 's/=.*$$//'`; \
+ number=`echo $$version | sed "s/^.*=//"`; \
+ echo $$lib $$number $$setname; \
+ done > $@T; exit 0
+ mv -f $@T $@
+$(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
+ while read lib number setname; do \
+ case $$number in \
+ [0-9]*) echo "$$lib.so-version=.$$number"; \
+ echo "all-sonames+=$$lib.so\$$($$lib.so-version)";;\
+ *) echo "$$lib.so-version=$$number"; \
+ echo "all-sonames+=\$$($$lib.so-version)";;\
+ esac; \
+ done < $< > $@T; exit 0
mv -f $@T $@
endif
endif