[PLUGIN] c-family files installation
This patch add a new exception to the plugin header flattering strategy. c-family files can't be installed in the plugin include root directory as some other files like cp/cp-tree.h will look for them in the c-family directory. Furthermore, i had to correct an include in c-pretty-print.h so that it looks for c-common.h in the c-family directory. That way, headers will work out of the box when compiling a plugin, there is no need for additional include directory. Builds and installs fine Ok for the trunk (i have no write access) ? Romain Geissler gcc/c-family/ 2011-07-11 Romain Geissler * c-pretty-print.h: Search c-common.h in c-family gcc/ 2011-07-11 Romain Geissler PR plugins/45348 PR plugins/48425 PR plugins/46577 * Makefile.in: Do not flatten c-family directory when installing plugin headers Index: gcc/c-family/c-pretty-print.h === --- gcc/c-family/c-pretty-print.h (revision 175907) +++ gcc/c-family/c-pretty-print.h (working copy) @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. #define GCC_C_PRETTY_PRINTER #include "tree.h" -#include "c-common.h" +#include "c-family/c-common.h" #include "pretty-print.h" Index: gcc/Makefile.in === --- gcc/Makefile.in (revision 175907) +++ gcc/Makefile.in (working copy) @@ -4643,7 +4643,7 @@ s-header-vars: Makefile # Install the headers needed to build a plugin. install-plugin: installdirs lang.install-plugin s-header-vars -# We keep the directory structure for files in config and .def files. All +# We keep the directory structure for files in config or c-family and .def files. All # other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \ @@ -4656,7 +4656,7 @@ install-plugin: installdirs lang.install else continue; \ fi; \ case $$path in \ - "$(srcdir)"/config/* | "$(srcdir)"/*.def ) \ + "$(srcdir)"/config/* | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ *) base=`basename $$path` ;; \ esac; \
Re: [PLUGIN] c-family files installation
On 07/11/2011 05:18 PM, Romain Geissler wrote: > This patch add a new exception to the plugin header flattering strategy. > c-family files can't be installed in the plugin include root directory as some > other files like cp/cp-tree.h will look for them in the c-family directory. > > Furthermore, i had to correct an include in c-pretty-print.h so that it > looks for c-common.h in the c-family directory. That way, headers will > work out of the box when compiling a plugin, there is no need for > additional include directory. > > Builds and installs fine > > Ok for the trunk (i have no write access) ? looks ok (but I cannot approve it). Almost the same patch submitted at http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01461.html, but this chunk unreviewed. Matthias
Re: [PLUGIN] c-family files installation
2011/7/11 Matthias Klose : > On 07/11/2011 05:18 PM, Romain Geissler wrote: >> This patch add a new exception to the plugin header flattering strategy. >> c-family files can't be installed in the plugin include root directory as >> some >> other files like cp/cp-tree.h will look for them in the c-family directory. >> >> Furthermore, i had to correct an include in c-pretty-print.h so that it >> looks for c-common.h in the c-family directory. That way, headers will >> work out of the box when compiling a plugin, there is no need for >> additional include directory. >> >> Builds and installs fine >> >> Ok for the trunk (i have no write access) ? > > looks ok (but I cannot approve it). Almost the same patch submitted at > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01461.html, but this chunk > unreviewed. > > Matthias > Hi Is there something wrong with this patch ? Is it ok for the trunk ? Romain Geissler
Re: [PLUGIN] c-family files installation
On Mon, 11 Jul 2011, Romain Geissler wrote: > This patch add a new exception to the plugin header flattering strategy. > c-family files can't be installed in the plugin include root directory as some > other files like cp/cp-tree.h will look for them in the c-family directory. > > Furthermore, i had to correct an include in c-pretty-print.h so that it > looks for c-common.h in the c-family directory. That way, headers will > work out of the box when compiling a plugin, there is no need for > additional include directory. The c-pretty-print.h change is OK. The Makefile.in change is OK in the absence of any plugin maintainer objections within 24 hours (I advice CC:ing the plugin maintainers on all plugin-related patches). -- Joseph S. Myers jos...@codesourcery.com