mirror of git://sourceware.org/git/glibc.git
elf: Use a temporary file to generate Makefile fragments [BZ #28550]
1. Use a temporary file to generate Makefile fragments for DSO sorting tests and use -include on them. 2. Add Makefile fragments to postclean-generated so that a "make clean" removes the autogenerated fragments and a subsequent "make" regenerates them. This partially fixes BZ #28550. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
b4bbedb1e7
commit
1f67d8286b
10
elf/Makefile
10
elf/Makefile
|
@ -491,6 +491,7 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \
|
||||||
$(objpfx)tst-unused-dep-cmp.out
|
$(objpfx)tst-unused-dep-cmp.out
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef avoid-generated
|
||||||
# DSO sorting tests:
|
# DSO sorting tests:
|
||||||
# The dso-ordering-test.py script generates testcase source files in $(objpfx),
|
# The dso-ordering-test.py script generates testcase source files in $(objpfx),
|
||||||
# creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
|
# creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
|
||||||
|
@ -498,9 +499,14 @@ endif
|
||||||
define include_dsosort_tests
|
define include_dsosort_tests
|
||||||
$(objpfx)$(1).generated-makefile: $(1)
|
$(objpfx)$(1).generated-makefile: $(1)
|
||||||
$(PYTHON) $(..)scripts/dso-ordering-test.py \
|
$(PYTHON) $(..)scripts/dso-ordering-test.py \
|
||||||
--description-file $$< --objpfx $(objpfx) --output-makefile $$@
|
--description-file $$< --objpfx $(objpfx) --output-makefile $$@T
|
||||||
include $(objpfx)$(1).generated-makefile
|
mv $$@T $$@
|
||||||
|
-include $(objpfx)$(1).generated-makefile
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
|
postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \
|
||||||
|
$(objpfx)/dso-sort-tests-2.generated-makefile
|
||||||
|
|
||||||
# Generate from each testcase description file
|
# Generate from each testcase description file
|
||||||
ifeq (yes,$(have-tunables))
|
ifeq (yes,$(have-tunables))
|
||||||
|
|
Loading…
Reference in New Issue