From 2a4c03661e3152ad410d4e07481c738e1898e0c9 Mon Sep 17 00:00:00 2001 From: Taras Glek Date: Tue, 14 Jul 2009 22:25:23 +0000 Subject: sourcebuild.texi: Document install-plugin target. 2009-07-14 Taras Glek Rafael Espindola * doc/sourcebuild.texi: Document install-plugin target. * configure.ac: Added install-plugin target to language makefiles. * configure: Regenerate. * Makefile.in: (install-plugin): Install more headers, depend on lang.install-plugin. ada/ChangeLog * gcc-interface/Make-lang.in (ada.install-plugin): New target for installing plugin headers. cp/ChangeLog * Make-lang.in: Added CP_PLUGIN_HEADERS and c.install-target to export cp-tree.h cxx-pretty-print.h name-lookup.h headers for plugins. fortran/ChangeLog * Make-lang.in (fortran.install-plugin): New target for installing plugin headers. java/ChangeLog * Make-lang.in (java.install-plugin): New target for installing plugin headers. objc/ChangeLog * Make-lang.in (objc.install-plugin): New target for installing plugin headers. objcp/ChangeLog * Make-lang.in (obj-c.install-plugin): New target for installing plugin headers. Co-Authored-By: Rafael Avila de Espindola From-SVN: r149648 --- gcc/ChangeLog | 9 +++++++ gcc/Makefile.in | 5 ++-- gcc/ada/ChangeLog | 6 +++++ gcc/ada/gcc-interface/Make-lang.in | 1 + gcc/configure | 2 +- gcc/configure.ac | 2 +- gcc/cp/ChangeLog | 7 ++++++ gcc/cp/Make-lang.in | 14 +++++++++++ gcc/doc/sourcebuild.texi | 2 ++ gcc/fortran/ChangeLog | 6 +++++ gcc/fortran/Make-lang.in | 2 ++ gcc/java/ChangeLog | 6 +++++ gcc/java/Make-lang.in | 1 + gcc/objc/ChangeLog | 6 +++++ gcc/objc/Make-lang.in | 1 + gcc/objcp/ChangeLog | 6 +++++ gcc/objcp/Make-lang.in | 1 + gcc/testsuite/ChangeLog | 7 ++++++ gcc/testsuite/g++.dg/plugin/header-plugin-test.C | 3 +++ gcc/testsuite/g++.dg/plugin/header_plugin.c | 32 ++++++++++++++++++++++++ gcc/testsuite/g++.dg/plugin/plugin.exp | 3 ++- 21 files changed, 117 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/g++.dg/plugin/header-plugin-test.C create mode 100644 gcc/testsuite/g++.dg/plugin/header_plugin.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44e90cb..e788bed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * doc/sourcebuild.texi: Document install-plugin target. + * configure.ac: Added install-plugin target to language makefiles. + * configure: Regenerate. + * Makefile.in: (install-plugin): Install more headers, + depend on lang.install-plugin. + 2009-07-15 Manuel López-Ibáñez * tree-vrp.c (vrp_evaluate_conditional): Mark strings for diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 9567dfe..11a4bcb 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -4079,10 +4079,11 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) \ $(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \ $(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \ - intl.h $(PLUGIN_VERSION_H) + intl.h $(PLUGIN_VERSION_H) $(DIAGNOSTIC_H) $(C_COMMON_H) $(C_PRETTY_PRINT_H) \ + tree-iterator.h $(PLUGIN_H) $(TREE_FLOW_H) langhooks.h # Install the headers needed to build a plugin. -install-plugin: installdirs +install-plugin: installdirs lang.install-plugin # We keep the directory structure for files in config and .def files. All # other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5d888c0..a3162c2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * gcc-interface/Make-lang.in (ada.install-plugin): New target for + installing plugin headers. + 2009-07-13 Ed Schonberg * exp_ch7.adb, exp_util.adb, tbuild.adb, tbuild.ads, exp_ch4.adb, diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index c154be7..0f4082a 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -714,6 +714,7 @@ install-gnatlib-obj: $(MAKE) -C ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib-obj ada.install-man: +ada.install-plugin: ada.uninstall: -$(RM) $(DESTDIR)$(bindir)/gnatbind$(exeext) diff --git a/gcc/configure b/gcc/configure index 6948ca4..52c5cc7 100755 --- a/gcc/configure +++ b/gcc/configure @@ -28852,7 +28852,7 @@ touch Make-hooks target_list="all.cross start.encap rest.encap tags \ install-common install-man install-info install-pdf dvi pdf \ html uninstall info man srcextra srcman srcinfo \ - mostlyclean clean distclean maintainer-clean" + mostlyclean clean distclean maintainer-clean install-plugin" for t in $target_list do diff --git a/gcc/configure.ac b/gcc/configure.ac index f0a239b..f73fc16 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3942,7 +3942,7 @@ touch Make-hooks target_list="all.cross start.encap rest.encap tags \ install-common install-man install-info install-pdf dvi pdf \ html uninstall info man srcextra srcman srcinfo \ - mostlyclean clean distclean maintainer-clean" + mostlyclean clean distclean maintainer-clean install-plugin" for t in $target_list do diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3197057..4265fa9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in: Added CP_PLUGIN_HEADERS and + c.install-target to export cp-tree.h cxx-pretty-print.h + name-lookup.h headers for plugins. + 2009-07-14 Jason Merrill PR c++/37276 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 2c562f8..6bff698 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -41,6 +41,7 @@ CXX_INSTALL_NAME := $(shell echo c++|sed '$(program_transform_name)') GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)') CXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo c++|sed '$(program_transform_name)') GXX_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo g++|sed '$(program_transform_name)') +CP_PLUGIN_HEADERS := cp-tree.h cxx-pretty-print.h name-lookup.h # # Define the names for selecting c++ in LANGUAGES. @@ -189,6 +190,19 @@ $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext): doc/g++.1 installdirs -$(INSTALL_DATA) $< $@ -chmod a-x $@ +c++.install-plugin: installdirs +# We keep the directory structure for files in config and .def files. All +# other files are flattened to a single directory. + headers="$(CP_PLUGIN_HEADERS)"; \ + for file in $$headers; do \ + path=$(srcdir)/cp/$$file; \ + dest=$(plugin_includedir)/cp/$$file; \ + echo $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \ + dir=`dirname $$dest`; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \ + done + c++.uninstall: -rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext) -rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index e437848..22b27e7 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -615,6 +615,8 @@ that should be installed. @item install-man Install man pages for the front end. This target should ignore errors. +@item install-plugin +Install headers needed for plugins. @item srcextra Copies its dependencies into the source directory. This generally should be used for generated files such as Bison output files which are not diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 19b201d..aaf2c88 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in (fortran.install-plugin): New target for + installing plugin headers. + 2009-07-13 H.J. Lu * module.c (mio_symbol): Remove the unused variable, formal. diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 0ac9bb2..38041f0 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -234,6 +234,8 @@ fortran.install-common: install-finclude-dir installdirs fi ; \ fi +fortran.install-plugin: + fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 9f90f53..9e7e5f5 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in (java.install-plugin): New target for + installing plugin headers. + 2009-07-07 Manuel López-Ibáñez * class.c: Replace %J by an explicit location. Update all calls. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 263ddc3..094e5e1 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -180,6 +180,7 @@ java.install-common: installdirs fi ; \ done +java.install-plugin: java.install-man: java.uninstall: diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 00475c1..13d537e 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in (objc.install-plugin): New target for + installing plugin headers. + 2009-07-07 Manuel López-Ibáñez * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index bfe8a84..fad506b 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -98,6 +98,7 @@ objc.html: objc.man: objc.srcinfo: objc.srcman: +objc.install-plugin: objc.tags: force cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \ diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog index 526830f..a19627c 100644 --- a/gcc/objcp/ChangeLog +++ b/gcc/objcp/ChangeLog @@ -1,3 +1,9 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * Make-lang.in (obj-c.install-plugin): New target for + installing plugin headers. + 2009-06-19 Ian Lance Taylor * objcp-decl.h (start_struct): Remove in_struct and struct_types diff --git a/gcc/objcp/Make-lang.in b/gcc/objcp/Make-lang.in index 2b1b809..0f549d0 100644 --- a/gcc/objcp/Make-lang.in +++ b/gcc/objcp/Make-lang.in @@ -107,6 +107,7 @@ obj-c++.html: obj-c++.srcinfo: obj-c++.srcextra: obj-c++.man: +obj-c++.install-plugin: obj-c++.tags: force cd $(srcdir)/objcp; etags -o TAGS.sub *.y *.c *.h; \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a279414..140bb9e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-07-14 Taras Glek + Rafael Espindola + + * g++.dg/plugin/header-plugin-test.C: New. + * g++.dg/plugin/header_plugin.c: New. + * g++.dg/plugin/plugin.exp: Update. + 2009-07-14 Uros Bizjak * gcc.target/i386/sse-recip-vec.c: Move arrays out of test diff --git a/gcc/testsuite/g++.dg/plugin/header-plugin-test.C b/gcc/testsuite/g++.dg/plugin/header-plugin-test.C new file mode 100644 index 0000000..bd6aff1 --- /dev/null +++ b/gcc/testsuite/g++.dg/plugin/header-plugin-test.C @@ -0,0 +1,3 @@ +// Test case for the dumb plugin. +// { dg-do compile } + diff --git a/gcc/testsuite/g++.dg/plugin/header_plugin.c b/gcc/testsuite/g++.dg/plugin/header_plugin.c new file mode 100644 index 0000000..a934030 --- /dev/null +++ b/gcc/testsuite/g++.dg/plugin/header_plugin.c @@ -0,0 +1,32 @@ +#include "gcc-plugin.h" +#include +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tree.h" +#include "tree-pass.h" +#include "intl.h" + +/* reqs */ +#include "tm.h" + +/* gcc/ headers. */ +#include "diagnostic.h" +#include "c-common.h" +#include "c-pretty-print.h" +#include "tree-iterator.h" +#include "plugin.h" +#include "tree-flow.h" +#include "langhooks.h" +#include "cp/cp-tree.h" +#include "cp/cxx-pretty-print.h" +#include "cp/name-lookup.h" + +int plugin_is_GPL_compatible; + +int +plugin_init (struct plugin_name_args *plugin_info, + struct plugin_gcc_version *version) +{ + return 0; +} diff --git a/gcc/testsuite/g++.dg/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp index eb01998..4ba73e5 100644 --- a/gcc/testsuite/g++.dg/plugin/plugin.exp +++ b/gcc/testsuite/g++.dg/plugin/plugin.exp @@ -49,7 +49,8 @@ load_lib plugin-support.exp set plugin_test_list [list \ { attribute_plugin.c attribute_plugin-test-1.C } \ { selfassign.c self-assign-test-1.C self-assign-test-2.C self-assign-test-3.C } \ - { dumb_plugin.c dumb-plugin-test-1.C } ] + { dumb_plugin.c dumb-plugin-test-1.C } \ + { header_plugin.c header-plugin-test.C } ] foreach plugin_test $plugin_test_list { # Replace each source file with its full-path name -- cgit v1.1