aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makerules b/Makerules
index 2000e54..d19ebf2 100644
--- a/Makerules
+++ b/Makerules
@@ -105,6 +105,11 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
sed -n '/ VERSION_$*_/{s/^.*_\([A-Z0-9_]*\).*$$/\1/;h;};$${g;p;}' \
$(common-objpfx)abi-versions.h > $@T
mv -f $@T $@
+
+# first-versions.h provides macros used in various symbol versioning
+# macro calls.
+before-compile := $(common-objpfx)first-versions.h $(before-compile)
+$(common-objpfx)first-versions.h: $(common-objpfx)versions.stmp
endif # avoid-generated
endif # $(build-shared) = yes
@@ -458,7 +463,8 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
$(wildcard $(sysdirs:%=%/Versions)) \
$(sysd-versions-force)
-$(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
+$(common-objpfx)sysd-versions: $(common-objpfx)versions.stmp
+$(common-objpfx)versions.stmp: $(common-objpfx)Versions.all \
$(common-objpfx)Versions.v \
$(..)scripts/versions.awk
( echo 'sysd-versions-subdirs = $(subdirs) $(config-sysdirs)' ; \
@@ -466,8 +472,9 @@ $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
| LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
-v move_if_change='$(move-if-change)' \
-f $(word 3,$^); \
- ) > $@T
- mv -f $@T $@
+ ) > $(common-objpfx)sysd-versionsT
+ mv -f $(common-objpfx)sysd-versionsT $(common-objpfx)sysd-versions
+ touch $@
endif # avoid-generated
endif # $(build-shared) = yes
endif # sysd-sorted-done