about summary refs log tree commit diff
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
parent6b3c3a3525b6571c546a8a9aad8f3a53a055dc2a (diff)
downloadglibc-ba7e89ec3321d67584eea5857853309846a73806.tar.gz
glibc-ba7e89ec3321d67584eea5857853309846a73806.tar.xz
glibc-ba7e89ec3321d67584eea5857853309846a73806.zip
* 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.
-rw-r--r--ChangeLog9
-rw-r--r--Makeconfig56
-rw-r--r--Makerules13
3 files changed, 43 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index aee8adfef2..cd4f0f5ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2000-03-19  Roland McGrath  <roland@baalperazim.frob.com>
 
+	* 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.
+
 	* Makerules (Versions.all): Use $(foreach ...) instead of sh for loop
 	for $(map-firstversions), which better handles it being empty.
 
diff --git a/Makeconfig b/Makeconfig
index 14a690d213..32f67cf89c 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
diff --git a/Makerules b/Makerules
index 202c92239f..8535d10ddd 100644
--- a/Makerules
+++ b/Makerules
@@ -290,13 +290,16 @@ ifneq ($(sysd-versions-subdirs),$(all-subdirs) $(config-sysdirs))
 sysd-versions-force = FORCE
 FORCE:
 endif
+$(common-objpfx)version-renames.def: $(common-objpfx)soversions.i
+	while read lib version setname; do \
+	  test -z "$$setname" || echo "$$lib : $$setname"; \
+	done < $< > $@T; exit 0
+	mv -f $@T $@
 $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
+			      $(common-objpfx)version-renames.def \
 	                      $(..)Versions.def \
-			      $(wildcard $(add-ons:%=$(..)%/Versions.def)) \
-			      $(common-objpfx)soversions.mk
-	{ $(foreach map,$(map-firstversions),echo '$(subst :, : ,$(map))';) \
-	  cat $(filter-out $< $(common-objpfx)soversions.mk,$^); \
-	} | LC_ALL=C $(AWK) -f $< > $@T
+			      $(wildcard $(add-ons:%=$(..)%/Versions.def))
+	cat $(filter-out $<,$^) | LC_ALL=C $(AWK) -f $< > $@T
 	mv -f $@T $@
 $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
 			       $(..)scripts/versions.awk \