about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-27 19:42:09 +0000
committerRoland McGrath <roland@gnu.org>2000-03-27 19:42:09 +0000
commit480d827b660a4e13fd5b9a4bacb3df57cad1a5aa (patch)
treef7008331c3b564143156a8d07a5d60c9afb70319
parent22d5fbfe74038c925bae4abbb1a911818a77ee42 (diff)
downloadglibc-480d827b660a4e13fd5b9a4bacb3df57cad1a5aa.tar.gz
glibc-480d827b660a4e13fd5b9a4bacb3df57cad1a5aa.tar.xz
glibc-480d827b660a4e13fd5b9a4bacb3df57cad1a5aa.zip
2000-03-27 Roland McGrath <roland@baalperazim.frob.com>
	* Makeconfig (preprocess-versions): New canned sequence for running
	cpp on shlib-versions and the like.
	(soversions.i): Use it.
	* Makerules (Versions.all, sysd-versions): Use it to preprocess the
	Versions.def and Versions files.
-rw-r--r--Makeconfig13
-rw-r--r--Makerules11
-rw-r--r--Versions.def3
3 files changed, 20 insertions, 7 deletions
diff --git a/Makeconfig b/Makeconfig
index daae310cee..56b5d3330b 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -670,6 +670,14 @@ endif
 
 ifeq (yes, $(build-shared))
 
+# Commands to put in a pipeline to preprocess a file with # comments
+# %ifdef et al based on config.h settings or other %include'd files.
+define preprocess-versions
+sed 's/#.*$$//;s/^[ 	]*%/#/' \
+| $(CC) $(CPPFLAGS) -E -undef -include $(common-objpfx)config.h -x c - \
+| sed 's/#.*$$//;/^[ 	]*$$/d'
+endef
+
 # Process the shlib-versions file, which tells us what shared library
 # version numbers to use when we install shared objects on this system.
 # We need to wait until $(subdirs) is complete.
@@ -681,9 +689,8 @@ $(common-objpfx)soversions.i: $(..)shlib-versions $(..)Makeconfig \
 						       $(add-ons) \
 						       $(subdirs))) \
 			      $(common-objpfx)config.make
-	sed -e 's/#.*$$//;s/^[ 	]*%/#/' \
-	    $(filter-out $(..)Makeconfig $(common-objpfx)config.make,$^) \
-	| $(CC) -E -undef -include $(common-objpfx)config.h -x c - \
+	cat $(filter-out $(..)Makeconfig $(common-objpfx)config.make,$^) \
+	| $(preprocess-versions) \
 	| while read conf version setname; do \
 	    test -n "$$version" && \
 	    test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
diff --git a/Makerules b/Makerules
index edbf8a5b81..6f5e43320c 100644
--- a/Makerules
+++ b/Makerules
@@ -297,7 +297,8 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
 	{ while read lib version setname; do \
 	    test -z "$$setname" || echo "$$lib : $$setname"; \
 	  done < $(word 2,$^); \
-	  cat $(filter-out $< $(word 2,$^),$^); \
+	  cat $(filter-out $< $(word 2,$^),$^) \
+	  | $(preprocess-versions); \
 	} | LC_ALL=C $(AWK) -f $< > $@T
 	mv -f $@T $@
 $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
@@ -306,9 +307,11 @@ $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
 			       $(wildcard $(sysdirs:%=%/Versions)) \
 			       $(sysd-versions-force)
 	{ echo 'sysd-versions-subdirs = $(all-subdirs) $(config-sysdirs)' ; \
-	  LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
-		 -v move_if_change='$(move-if-change)' \
-		 -f $(filter-out $< $(sysd-versions-force),$^); \
+	  cat $(filter-out $< $(word 2,$^) $(sysd-versions-force),$^) \
+	  | $(preprocess-versions) \
+	  | LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
+			    -v move_if_change='$(move-if-change)' \
+			    -f $(word 2,$^); \
 	} > $@T
 	mv -f $@T $@
 endif # avoid-generated
diff --git a/Versions.def b/Versions.def
index 31674d4bc3..962bcf6e48 100644
--- a/Versions.def
+++ b/Versions.def
@@ -9,6 +9,9 @@ libc {
   GLIBC_2.1.3
   GLIBC_2.1.4
   GLIBC_2.2
+%ifdef USE_IN_LIBIO
+  HURD_CTHREADS_0.3
+%endif
 }
 libcrypt {
   GLIBC_2.0