diff mbox

[PLUGIN] c-family files installation

Message ID CAF+LTee+7Vzky14VJhG59D4sdDaZ2C2p9oV2hZN+d2DG9YvpWg@mail.gmail.com
State New
Headers show

Commit Message

Romain Geissler July 11, 2011, 3:18 p.m. UTC
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


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

Comments

Matthias Klose July 11, 2011, 8:22 p.m. UTC | #1
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
Romain Geissler July 18, 2011, 7:07 a.m. UTC | #2
2011/7/11 Matthias Klose <doko@debian.org>:
> 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
Joseph Myers July 21, 2011, 2:35 p.m. UTC | #3
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).
diff mbox

Patch

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)