[PLUGIN] c-family files installation

Romain Geissler romain.geissler@gmail.com
Mon Jul 11 15:37:00 GMT 2011


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  <romain.geissler@gmail.com>

     * c-pretty-print.h: Search c-common.h in c-family

gcc/
2011-07-11  Romain Geissler  <romain.geissler@gmail.com>

     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; \



More information about the Gcc-patches mailing list