+2017-05-09 Zack Weinberg <zackw@panix.com>
+
+ * extra-modules.mk: Delete file.
+ * cppflags-iterator.mk: Rename to ...
+ * libof-iterator.mk: ...this. Adjust comments.
+
+ * Makerules, extra-lib.mk, benchtests/Makefile, elf/Makefile
+ * elf/rtld-Rules, iconv/Makefile, locale/Makefile, malloc/Makefile
+ * nscd/Makefile, sunrpc/Makefile, sysdeps/s390/Makefile:
+ Use libof-iterator.mk instead of cppflags-iterator.mk or
+ extra-modules.mk.
+
+ * benchtests/strcoll-inputs/filelist#en_US.UTF-8: Remove
+ extra-modules.mk and cppflags-iterator.mk, add libof-iterator.mk.
+
2017-05-09 Stefan Liebler <stli@linux.vnet.ibm.com>
* sysdeps/s390/fpu/libm-test-ulps: Regenerated.
# The makefile may define $(modules-names) to build additional modules.
# These are built with $(build-module), except any in $(modules-names-nobuild).
ifdef modules-names
-# extra-lib.mk is included once for each extra lib to define rules
-# to build it, and to add its objects to the various variables.
-# During its evaluation, $(lib) is set to the name of the library.
-extra-modules-left := $(modules-names)
-include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
+cpp-srcs-left := $(modules-names)
+lib = extramodules
+include $(patsubst %,$(..)libof-iterator.mk,$(modules-names))
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
ifneq (,$(all-nonlib))
cpp-srcs-left = $(all-nonlib)
lib := nonlib
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
$(binaries-bench-malloc:=.c)
lib := nonlib
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
bench-extra-objs = json-lib.o
libc.pot
ko.po
ru.po
-extra-modules.mk
intl
tst-gettext4-fr.po
tstcodeset.po
atomic.h
utmp.h
stdlib-bsearch.h
-cppflags-iterator.mk
iconvdata
MISSING
ibm1164.h
bug-nexttoward.c
w_dreml.c
s_nanf.c
+libof-iterator.mk
+++ /dev/null
-# This file is included several times in a row, once
-# for each element of $(lib)-routines and $(lib)-sysdeps_routines.
-
-cpp-src := $(firstword $(cpp-srcs-left))
-cpp-srcs-left := $(filter-out $(cpp-src),$(cpp-srcs-left))
-
-libof-$(notdir $(cpp-src)) := $(lib)
cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))
# Set libof-* for each routine.
cpp-srcs-left := $(rtld-modules:%.os=%)
lib := rtld
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
rtld-CFLAGS += $(no-stack-protector)
# This will define `libof-ROUTINE := LIB' for each of the routines.
cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
ifneq (,$(cpp-srcs-left))
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
+++ /dev/null
-# This file is included several times in a row, once
-# for each element of $(modules-names). $(extra-modules-left)
-# is initialized first to $(modules-names) so that with each
-# inclusion, we advance $(module) to the next name.
-
-module := $(firstword $(extra-modules-left))
-extra-modules-left := $(filter-out $(module),$(extra-modules-left))
-
-libof-$(notdir $(module)) := extramodules
# Set libof-* for each routine.
cpp-srcs-left := $(iconv_prog-modules) $(iconvconfig-modules)
lib := iconvprogs
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
ifeq ($(run-built-tests),yes)
xtests-special += $(objpfx)test-iconvconfig.out
$(libKSC-routines) $(libGB-routines) $(libCNS-routines) \
$(libISOIR165-routines) $(libJISX0213-routines)
lib := iconvdata
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
tst-loading-ENV = MALLOC_TRACE=$(objpfx)tst-loading.mtrace
$(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
--- /dev/null
+# This file is included several times in a row, once for each element
+# $(cpp-src) of $(cpp-srcs-left). It sets libof-$(cpp-src) to $(lib)
+# for each.
+
+cpp-src := $(firstword $(cpp-srcs-left))
+cpp-srcs-left := $(filter-out $(cpp-src),$(cpp-srcs-left))
+
+libof-$(notdir $(cpp-src)) := $(lib)
cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
$(lib-modules)
lib := locale-programs
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
cpp-srcs-left := $(memusagestat-modules)
lib := memusagestat
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
$(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o)
$(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm
# Set libof-nscd.
cpp-srcs-left := $(nscd-modules)
lib := nscd
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
$(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
# This makes sure -DIN_MODULE is passed for all these modules.
cpp-srcs-left := $(rpcgen-objs:.o=.c)
lib := nonlib
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
# How we run rpcgen to generate sources and headers in the rules below.
# Setting CPP tells it how to run the C preprocessor correctly. Note
cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines))
lib := iconvdata
-include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
extra-objs += $(addsuffix .so, $(s390x-iconv-modules))
install-others += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules))