($(common-objpfx)sysd-versions): Define here instead. Pass name of
authordrepper <drepper>
Mon, 6 Jul 1998 17:05:37 +0000 (17:05 +0000)
committerdrepper <drepper>
Mon, 6 Jul 1998 17:05:37 +0000 (17:05 +0000)
Versions.def file to script and redirect output to target.  Include it
and make all generated version maps depend on it.

Makerules

index 998f866..01be04b 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -276,6 +276,17 @@ ifndef sysd-rules-done
 no_deps=t
 endif
 
+# Generate version maps.
+ifeq ($(versioning),yes)
+-include $(common-objpfx)sysd-versions
+$(common-objpfx)sysd-versions: $(..)Versions.def $(..)versions.awk \
+                              $(wildcard $(all-subdirs:%=$(..)%/Versions)) \
+                              $(wildcard $(+sysdep_dirs:%=%/Versions))
+       $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
+              -f $(filter-out $<,$^) > $@T
+       mv -f $@T $@
+$(all-version-maps): $(common-objpfx)sysd-versions
+endif
 
 ifndef compile-command.S
 compile-command.S = $(compile.S) $(OUTPUT_OPTION)