This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RESEND PATCH v6 4/5] Include group information to xml syscall files.
- From: Pedro Alves <palves at redhat dot com>
- To: Gabriel Krisman Bertazi <gabriel at krisman dot be>, gdb-patches at sourceware dot org
- Cc: sergiodj at redhat dot com, dje at google dot com
- Date: Fri, 27 May 2016 11:17:58 +0100
- Subject: Re: [RESEND PATCH v6 4/5] Include group information to xml syscall files.
- Authentication-results: sourceware.org; auth=none
- References: <87shxd1mx2 dot fsf at oberon dot home> <1463713807-11250-1-git-send-email-gabriel at krisman dot be>
On 05/20/2016 04:10 AM, Gabriel Krisman Bertazi wrote:
> Patch 4/5 bounced due to size. Resending with -M to detect renames...
Thanks, that's the right thing to do, even without bounces. Best is
to adjust the git config to make that the default.
On 05/20/2016 04:10 AM, Gabriel Krisman Bertazi wrote:
> --- /dev/null
> +++ b/gdb/syscalls/apply-defaults.xsl
> @@ -0,0 +1,31 @@
> +<!-- Copyright (C) 2016 Free Software Foundation, Inc.
> +
> + Copying and distribution of this file, with or without modification,
> + are permitted in any medium without royalty provided the copyright
> + notice and this notice are preserved. -->
> +
Shouldn't this file be GPLv3+ like all other build or source files?
> We maintain linux-defaults.xml.in, a template file to hold generic group
> information. It is used by the XSL script that parses the architecture
> specific files to generate the final xml files, which are actually
> installed and loaded by GDB. The script is not run during the normal
> build process, only when building in maintainer mode.
> +@MAINTAINER_MODE_TRUE@%.xml: %.xml.in apply-defaults.xsl linux-defaults.xml.in
> +@MAINTAINER_MODE_TRUE@ $(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl $<;\
> +
Please always define the rules in the Makefile.in even without
maintainer mode. What you want is force the _dependencies_ when maintainer
mode is active, but leave them out otherwise.
That would make it possible to force-regenerate the files even when
not using maintainer mode.
See e.g.,: gdb/Makefile.in:
$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
...
So that'd be something like:
%.xml: @MAINTAINER_MODE_TRUE@ %.xml.in apply-defaults.xsl linux-defaults.xml.in
$(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl $<;\
It'd be convenient to add a rule to regenerate all xml files, something like:
.PHONY syscall-xml
syscall-xml: $(SYSCALLS_FILES)
.PHONY clean-syscall-xml
clean-syscall-xml: $(SYSCALLS_FILES)
rm -f $(SYSCALLS_FILES)
Thanks,
Pedro Alves