about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-12-22 05:18:34 +0000
committerRoland McGrath <roland@gnu.org>2005-12-22 05:18:34 +0000
commit0c7c6d531f8514aaee236ab1388ed88c1c31a630 (patch)
treea049c3500bba177e7567307645d3eb0442fc4bd7 /Makerules
parentc72565e5f1124c2dc72573e83406fe999e56091f (diff)
downloadglibc-0c7c6d531f8514aaee236ab1388ed88c1c31a630.tar.gz
glibc-0c7c6d531f8514aaee236ab1388ed88c1c31a630.tar.xz
glibc-0c7c6d531f8514aaee236ab1388ed88c1c31a630.zip
* sysdeps/unix/sysv/linux/i386/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/i386/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/s390/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: File removed.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: New file.
	* sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = stdlib]:
	(gen-as-const-headers): Add it.
	* sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/s390/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise.
	* stdlib/tst-ucontext-off.c: File removed.
	* stdlib/Makefile (tests): Remove it.

	* scripts/gen-as-const.awk: Support generating a test program.
	* Makerules [gen-as-const-headers] (tests): Add test-as-const.
	[gen-as-const-headers] ($(objpfx)test-as-const.c): New target.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index d0b1d8975d..2679c0a74b 100644
--- a/Makerules
+++ b/Makerules
@@ -183,6 +183,7 @@ sed-remove-dotdot := -e 's@  *\([^ 	\/$$][^ 	\]*\)@ $$(..)\1@g' \
 endif
 
 
+ifdef gen-as-const-headers
 # Generating headers for assembly constants.
 # We need this defined early to get into before-compile before
 # it's used in sysd-rules, below.
@@ -201,6 +202,16 @@ $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
 	mv -f $(@:.h.d=.h)T $(@:.h.d=.h)
 vpath %.sym $(sysdirs)
 before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
+
+tests += test-as-const
+$(objpfx)test-as-const.c: $(..)scripts/gen-as-const.awk $(..)Makerules \
+			  $(gen-as-const-headers) \
+			  $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
+	($(AWK) '{ sub(/^/, "asconst_", $$2); print; }' $(filter %.h,$^); \
+	 $(AWK) -v test=1 -f $< $(filter %.sym,$^); \
+	 echo '#include "$(..)test-skeleton.c"') > $@T
+	mv -f $@T $@
+endif
 
 # Generate an ordered list of implicit rules which find the source files in
 # each sysdep directory.  The old method was to use vpath to search all the