This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: make bug?
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: Re: make bug?
- From: Zack Weinberg <zack@rabi.phys.columbia.edu>
- Date: Fri, 03 Jul 1998 12:23:42 -0400
- cc: libc-hacker@cygnus.com
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
- Follow-Ups:
- Re: make bug?
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>