1 # Copyright (C) 2007 Free Software Foundation, Inc.
3 # This file is part of GDB.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # This file requires GNU make!
22 # This Makefile updates files in ../regformats from their XML master
23 # copies. Because this relies on xsltproc, it is not normally run
24 # during the build process; it should be run by hand when one of the
25 # affected XML files is changed, and the results should be kept in the
28 WHICH
= arm-with-iwmmxt mips-linux mips64-linux
30 # Record which registers should be sent to GDB by default after stop.
31 arm-with-iwmmxt-expedite
= r11
,sp
,pc
32 mips-linux-expedite
= r29
,pc
33 mips64-linux-expedite
= r29
,pc
36 outdir
= ..
/regformats
37 OUTPUTS
= $(patsubst %,$(outdir
)/%.dat
,$(WHICH
))
41 $(outdir
)/%.dat
: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
42 echo
"# DO NOT EDIT: generated from $<" > $(outdir
)/$*.tmp
43 echo
"name:`echo $* | sed 's/-/_/g'`" >> $(outdir
)/$*.tmp
44 echo
"expedite:$($*-expedite)" >> $(outdir
)/$*.tmp
45 $(XSLTPROC
) --xinclude number-regs.xsl
$< | \
46 $(XSLTPROC
) sort-regs.xsl
- | \
47 $(XSLTPROC
) gdbserver-regs.xsl
- >> $(outdir
)/$*.tmp
48 sh ..
/..
/move-if-change
$(outdir
)/$*.tmp
$(outdir
)/$*.dat
51 $(outdir
)/arm-with-iwmmxt.dat
: arm-core.xml xscale-iwmmxt.xml