diff options
author | Zack Weinberg <zackw@panix.com> | 2017-05-08 15:52:26 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-05-09 07:06:29 -0400 |
commit | 2bfdaeddaad93425b93c42ef7a75443b96824942 (patch) | |
tree | ba08f29a6a80c64d9327e57a915d39f6e0750cee | |
parent | 61f4fa7fd71407b56c32e6be5147d84536697569 (diff) | |
download | glibc-2bfdaeddaad93425b93c42ef7a75443b96824942.tar.gz glibc-2bfdaeddaad93425b93c42ef7a75443b96824942.tar.xz glibc-2bfdaeddaad93425b93c42ef7a75443b96824942.zip |
Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk.
cppflags-iterator.mk no longer has anything to do with CPPFLAGS; all it does is set libof-$(foo) for a list of files. extra-modules.mk does the same thing, but with a different input variable, and doesn't let the caller control the module. Therefore, this patch gives cppflags-iterator.mk a better name, removes extra-modules.mk, and updates all uses of both. * 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.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | Makerules | 10 | ||||
-rw-r--r-- | benchtests/Makefile | 2 | ||||
-rw-r--r-- | benchtests/strcoll-inputs/filelist#en_US.UTF-8 | 3 | ||||
-rw-r--r-- | cppflags-iterator.mk | 7 | ||||
-rw-r--r-- | elf/Makefile | 2 | ||||
-rw-r--r-- | elf/rtld-Rules | 2 | ||||
-rw-r--r-- | extra-lib.mk | 2 | ||||
-rw-r--r-- | extra-modules.mk | 9 | ||||
-rw-r--r-- | iconv/Makefile | 2 | ||||
-rw-r--r-- | iconvdata/Makefile | 2 | ||||
-rw-r--r-- | libof-iterator.mk | 8 | ||||
-rw-r--r-- | locale/Makefile | 2 | ||||
-rw-r--r-- | malloc/Makefile | 2 | ||||
-rw-r--r-- | nscd/Makefile | 2 | ||||
-rw-r--r-- | sunrpc/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/s390/Makefile | 2 |
17 files changed, 39 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog index 33aa701fe8..d8e12d6359 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +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. diff --git a/Makerules b/Makerules index 7f0eef8096..15f46e5f3a 100644 --- a/Makerules +++ b/Makerules @@ -794,11 +794,9 @@ endif # 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: \ @@ -1327,7 +1325,7 @@ all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others)) 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 diff --git a/benchtests/Makefile b/benchtests/Makefile index a96e9533b3..7f5fda5ef4 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -123,7 +123,7 @@ 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 diff --git a/benchtests/strcoll-inputs/filelist#en_US.UTF-8 b/benchtests/strcoll-inputs/filelist#en_US.UTF-8 index b7b38017d8..6cee2374f4 100644 --- a/benchtests/strcoll-inputs/filelist#en_US.UTF-8 +++ b/benchtests/strcoll-inputs/filelist#en_US.UTF-8 @@ -9667,7 +9667,6 @@ hr.po libc.pot ko.po ru.po -extra-modules.mk intl tst-gettext4-fr.po tstcodeset.po @@ -13252,7 +13251,6 @@ sigset.h atomic.h utmp.h stdlib-bsearch.h -cppflags-iterator.mk iconvdata MISSING ibm1164.h @@ -15245,3 +15243,4 @@ w_exp2l.c bug-nexttoward.c w_dreml.c s_nanf.c +libof-iterator.mk diff --git a/cppflags-iterator.mk b/cppflags-iterator.mk deleted file mode 100644 index 89a472bd82..0000000000 --- a/cppflags-iterator.mk +++ /dev/null @@ -1,7 +0,0 @@ -# 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) diff --git a/elf/Makefile b/elf/Makefile index cc4aeb25b6..baf967821c 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -547,7 +547,7 @@ CFLAGS-rtld.c = $(SYSCONF-FLAGS) 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))) diff --git a/elf/rtld-Rules b/elf/rtld-Rules index 99b5899f7d..2c7b99828c 100644 --- a/elf/rtld-Rules +++ b/elf/rtld-Rules @@ -142,7 +142,7 @@ endif # 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) diff --git a/extra-lib.mk b/extra-lib.mk index 2552049135..72f8d2e1df 100644 --- a/extra-lib.mk +++ b/extra-lib.mk @@ -108,5 +108,5 @@ endif # 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 diff --git a/extra-modules.mk b/extra-modules.mk deleted file mode 100644 index 5f8e693b15..0000000000 --- a/extra-modules.mk +++ /dev/null @@ -1,9 +0,0 @@ -# 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 diff --git a/iconv/Makefile b/iconv/Makefile index 2b2bc8e303..b2fead0479 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -55,7 +55,7 @@ CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"' # 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 diff --git a/iconvdata/Makefile b/iconvdata/Makefile index e4845871f5..a0e297e4de 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -290,7 +290,7 @@ cpp-srcs-left := $(modules) $(generated-modules) $(libJIS-routines) \ $(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 diff --git a/libof-iterator.mk b/libof-iterator.mk new file mode 100644 index 0000000000..31560ce231 --- /dev/null +++ b/libof-iterator.mk @@ -0,0 +1,8 @@ +# 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) diff --git a/locale/Makefile b/locale/Makefile index 29a34b1f26..d9ef48fe93 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -101,4 +101,4 @@ CFLAGS-charmap-dir.c = -Wno-write-strings 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)) diff --git a/malloc/Makefile b/malloc/Makefile index e93b83b57d..e380e9629b 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -126,7 +126,7 @@ memusagestat-modules = memusagestat 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 diff --git a/nscd/Makefile b/nscd/Makefile index 0385a370f0..4126996887 100644 --- a/nscd/Makefile +++ b/nscd/Makefile @@ -92,7 +92,7 @@ endif # 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) diff --git a/sunrpc/Makefile b/sunrpc/Makefile index a5177fffdc..08bb9c6822 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -183,7 +183,7 @@ $(objpfx)cross-rpcgen: $(cross-rpcgen-objs) # 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 diff --git a/sysdeps/s390/Makefile b/sysdeps/s390/Makefile index d50836579f..8a54f88cd7 100644 --- a/sysdeps/s390/Makefile +++ b/sysdeps/s390/Makefile @@ -18,7 +18,7 @@ include extra-module.mk 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)) |