This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] posix: Do not include testcases.h, ptestcases.h in source tree


Note: The file deletion diffs have non-printable characters hard to send
in an email message, so I'm not including them here.

Thanks,
Florian

-----
posix: Do not include testcases.h, ptestcases.h in source tree

These files were both auto-generated and shipped in the source tree.
We can assume that sed is available and always generate the files
during the build.

2018-11-28  Florian Weimer  <fweimer@redhat.com>

	* posix/Makefile (before-compile): Remove testcases.h and
	ptestcases.h.
	(testcases.h, ptestcases.h): Move to $(objpfx).  Use
	$(move-if-change).
	(runtests.o): Add dependency on testcases.h.
	(runptests.o): Add dependency on ptestcases.h.
	* posix/testcases.h, posix/ptestcases.h: Remove files.
	* scripts/build-many-glibcs.py (Context.fix_glibc_timestamps): Do
	not touch posix/testcases.h and posix/ptestcases.h.

diff --git a/posix/Makefile b/posix/Makefile
index d67f68d0db..725054edef 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -115,7 +115,7 @@ others		:= getconf
 install-bin	:= getconf
 install-others-programs	:= $(inst_libexecdir)/getconf
 
-before-compile	+= testcases.h ptestcases.h $(objpfx)posix-conf-vars-def.h
+before-compile	+= $(objpfx)posix-conf-vars-def.h
 
 # So they get cleaned up.
 generated += $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
@@ -261,13 +261,15 @@ bug-glob1-ARGS = "$(objpfx)"
 tst-execvp3-ARGS = --test-dir=$(objpfx)
 CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
 
-testcases.h: TESTS TESTS2C.sed
+$(objpfx)testcases.h: TESTS TESTS2C.sed
 	LC_ALL=C sed -f TESTS2C.sed < $< > $@T
-	mv -f $@T $@
+	$(move-if-change) $@T $@
+$(objpfx)runtests.o: $(objpfx)testcases.h
 
-ptestcases.h: PTESTS PTESTS2C.sed
+$(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
 	LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
-	mv -f $@T $@
+	$(move-if-change) $@T $@
+$(objpfx)runptests.o: $(objpfx)ptestcases.h
 
 $(objpfx)tst-getopt-cancel: $(shared-thread-library)
 
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 376382d4a4..a05d079422 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -846,8 +846,7 @@ class Context(object):
         # Some other files have such dependencies but do not need to
         # be touched because nothing in a build depends on the files
         # in question.
-        for f in ('locale/C-translit.h', 'posix/ptestcases.h',
-                  'posix/testcases.h', 'sysdeps/gnu/errlist.c',
+        for f in ('locale/C-translit.h', 'sysdeps/gnu/errlist.c',
                   'sysdeps/mach/hurd/bits/errno.h',
                   'sysdeps/sparc/sparc32/rem.S',
                   'sysdeps/sparc/sparc32/sdiv.S',


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]