This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: make bug?


On 03 Jul 1998 09:12:43 -0700, Ulrich Drepper wrote:
>Zack Weinberg <zack@rabi.phys.columbia.edu> writes:
>
>> Is anyone else seeing this?  I've got only make 3.76.1 at the moment.
>
>I've done the work using make 3.75 and I've seen no such problem (and
>I've changed the Versions files often).

It's a problem only on a fresh build, when there is no libc.map in the
build directory.

The appended patch fixes the bug.  Note that it conflicts with the
Makeconfig patch I posted earlier -- ignore the part of that
patch that modifies Makefile.

zw

1998-07-03 12:17 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* Makefile [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.
	
============================================================
Index: Makefile
--- Makefile	1998/07/02 21:54:13	1.169
+++ Makefile	1998/07/03 16:16:29
@@ -78,7 +78,7 @@
 endif
 
 ifeq ($(versioning),yes)
-lib-noranlib: $(common-objpfx)sysd-versions
+lib-noranlib: lib-mapfiles
 endif
 
 include Makerules
@@ -318,10 +318,22 @@
 
 # Generate version maps.
 ifeq ($(versioning),yes)
-$(common-objpfx)sysd-versions: versions.awk \
-			       $(wildcard $(all-subdirs:%=%/Versions)) \
-			       $(wildcard $(+sysdep_dirs:%=%/Versions))
+ifndef avoid-generated
+$(common-objpfx)sysd-versions: Versions.def
+	(echo define vers-libs; \
+	sed -n 's/\(lib[a-z0-9_][a-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 $^
-	rm -f $@
-	echo > $@
+
+lib-mapfiles: $(common-objpfx)sysd-versions $(subst %,.,$(vers-libs))
+else
+lib-mapfiles:
+endif
 endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]