This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[pushed] features/Makefile: Make 'make cfiles' default to generating all C files


This makes it easier to rebuild all GDB's generated target description
C files.

It also clarifies the comments a bit.  One might think we need a GDB
configured for the particular arquitecture (--target=foo).  But a
build that includes support for the target description is sufficient.
(GDB rejects target descriptions that explicitly specify the
architecture, with an <architecture> element, if the architecture is
unknown.)

Tested that "make clean-cfiles" deletes all .c files under
src/gdb/features/, and that "make cfiles" generates them all without
error, and that diffing the newly generated C files against master
comes out an empty diff.

gdb/
2014-10-01  Pedro Alves  <palves@redhat.com>

	* features/Makefile: Update comments.
	(XMLTOC): List all xml files we build C files from.
	(clean-cfiles): New rule.
---
 gdb/ChangeLog         |   6 +++
 gdb/features/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 124 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 770e32d..a80b0d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2014-10-01  Pedro Alves  <palves@redhat.com>
 
+	* features/Makefile: Update comments.
+	(XMLTOC): List all xml files we build C files from.
+	(clean-cfiles): New rule.
+
+2014-10-01  Pedro Alves  <palves@redhat.com>
+
 	* features/i386/amd64-avx512-linux.c: Regenerate.
 	* features/i386/amd64-avx512.c: Regenerate.
 	* features/i386/x32-avx512-linux.c: Regenerate.
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index f967e4c..d0ffa52 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -25,9 +25,22 @@
 # GDB repository.
 
 # It can also update the C files in the features directory from their
-# XML master copies.  This relies on a GDB linked with expat and
-# configured for the correct architecture, so the files are again kept
-# in the GDB repository.  To generate C files:
+# XML master copies.  This relies on a GDB linked with expat and that
+# is configured to include support for the architecture, so the files
+# are kept in the GDB repository.
+#
+# By default we'll generate all C files, and you must point make at a
+# GDB that has been configured with --enable-targets=all:
+#
+#   make GDB=/path/to/gdb cfiles
+#
+# To regenerate all C files from scratch:
+#
+#   make GDB=/path/to/gdb clean-cfiles cfiles
+#
+# To generate specific C files, you can override the XMLTOC make
+# variable:
+#
 #   make GDB=/path/to/gdb XMLTOC="xml files" cfiles
 
 WHICH = aarch64 \
@@ -118,7 +131,103 @@ XSLTPROC = xsltproc
 outdir = ../regformats
 OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH))
 
-XMLTOC =
+# The set of xml files we'll generate .c files for GDB from.  By
+# default we'll build all .c files, which requires an
+# --enable-targets=all GDB.  You can override this by passing XMLTOC
+# to make on the command line.
+XMLTOC = \
+	aarch64.xml \
+	arm-with-iwmmxt.xml \
+	arm-with-m-fpa-layout.xml \
+	arm-with-m-vfp-d16.xml \
+	arm-with-m.xml \
+	arm-with-neon.xml \
+	arm-with-vfpv2.xml \
+	arm-with-vfpv3.xml \
+	i386/amd64-avx-linux.xml \
+	i386/amd64-avx.xml \
+	i386/amd64-avx512-linux.xml \
+	i386/amd64-avx512.xml \
+	i386/amd64-linux.xml \
+	i386/amd64-mpx-linux.xml \
+	i386/amd64-mpx.xml \
+	i386/amd64.xml \
+	i386/i386-avx-linux.xml \
+	i386/i386-avx.xml \
+	i386/i386-avx512-linux.xml \
+	i386/i386-avx512.xml \
+	i386/i386-linux.xml \
+	i386/i386-mmx-linux.xml \
+	i386/i386-mmx.xml \
+	i386/i386-mpx-linux.xml \
+	i386/i386-mpx.xml \
+	i386/i386.xml \
+	i386/x32-avx-linux.xml \
+	i386/x32-avx.xml \
+	i386/x32-avx512-linux.xml \
+	i386/x32-avx512.xml \
+	i386/x32-linux.xml \
+	i386/x32.xml \
+	microblaze-with-stack-protect.xml \
+	microblaze.xml \
+	mips-dsp-linux.xml \
+	mips-linux.xml \
+	mips64-dsp-linux.xml \
+	mips64-linux.xml \
+	nios2-linux.xml \
+	nios2.xml \
+	rs6000/powerpc-32.xml \
+	rs6000/powerpc-32l.xml \
+	rs6000/powerpc-403.xml \
+	rs6000/powerpc-403gc.xml \
+	rs6000/powerpc-405.xml \
+	rs6000/powerpc-505.xml \
+	rs6000/powerpc-601.xml \
+	rs6000/powerpc-602.xml \
+	rs6000/powerpc-603.xml \
+	rs6000/powerpc-604.xml \
+	rs6000/powerpc-64.xml \
+	rs6000/powerpc-64l.xml \
+	rs6000/powerpc-7400.xml \
+	rs6000/powerpc-750.xml \
+	rs6000/powerpc-860.xml \
+	rs6000/powerpc-altivec32.xml \
+	rs6000/powerpc-altivec32l.xml \
+	rs6000/powerpc-altivec64.xml \
+	rs6000/powerpc-altivec64l.xml \
+	rs6000/powerpc-cell32l.xml \
+	rs6000/powerpc-cell64l.xml \
+	rs6000/powerpc-e500.xml \
+	rs6000/powerpc-e500l.xml \
+	rs6000/powerpc-isa205-32l.xml \
+	rs6000/powerpc-isa205-64l.xml \
+	rs6000/powerpc-isa205-altivec32l.xml \
+	rs6000/powerpc-isa205-altivec64l.xml \
+	rs6000/powerpc-isa205-vsx32l.xml \
+	rs6000/powerpc-isa205-vsx64l.xml \
+	rs6000/powerpc-vsx32.xml \
+	rs6000/powerpc-vsx32l.xml \
+	rs6000/powerpc-vsx64.xml \
+	rs6000/powerpc-vsx64l.xml \
+	rs6000/rs6000.xml \
+	s390-linux32.xml \
+	s390-linux32v1.xml \
+	s390-linux32v2.xml \
+	s390-linux64.xml \
+	s390-linux64v1.xml \
+	s390-linux64v2.xml \
+	s390-te-linux64.xml \
+	s390x-linux64.xml \
+	s390x-linux64v1.xml \
+	s390x-linux64v2.xml \
+	s390x-te-linux64.xml \
+	tic6x-c62x-linux.xml \
+	tic6x-c62x.xml \
+	tic6x-c64x-linux.xml \
+	tic6x-c64x.xml \
+	tic6x-c64xp-linux.xml \
+	tic6x-c64xp.xml
+
 CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
 GDB = false
 
@@ -185,5 +294,10 @@ $(outdir)/i386/x32-avx512.dat: i386/x32-core.xml i386/64bit-avx.xml \
 $(outdir)/i386/x32-avx512-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
 			       i386/64bit-mpx.xml i386/64bit-avx512.xml i386/64bit-linux.xml
 
+# 'all' doesn't build the C files, so don't delete them in 'clean'
+# either.
+clean-cfiles:
+	rm -f $(CFILES)
+
 clean:
 	rm -f $(OUTPUTS)
-- 
1.9.3


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