summaryrefslogtreecommitdiff
path: root/o-iterator.mk
diff options
context:
space:
mode:
Diffstat (limited to 'o-iterator.mk')
-rw-r--r--o-iterator.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/o-iterator.mk b/o-iterator.mk
new file mode 100644
index 0000000000..18a6e48ae3
--- /dev/null
+++ b/o-iterator.mk
@@ -0,0 +1,9 @@
+# This file is included several times in a row, once
+# for each element of $(object-suffixes). $(object-suffixes-left)
+# is initialized first to $(object-suffixes) so that with each
+# inclusion, we advance $o to the next suffix.
+
+o := $(firstword $(object-suffixes-left))
+object-suffixes-left := $(filter-out $o,$(object-suffixes-left))
+
+$(o-iterator-doit)