From bf016de89035d04e7b8ac5db5de08e69eaa3960b Mon Sep 17 00:00:00 2001 From: Rafael Avila de Espindola Date: Tue, 5 May 2009 19:14:20 +0000 Subject: [PATCH] Makefile.in (enable_plugin, [...]): New. 2009-05-05 Rafael Avila de Espindola * Makefile.in (enable_plugin, plugin_includedir): New. (install): Depend on install-plugin. (PLUGIN_HEADERS): New. (install-plugin): New. * config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64. From-SVN: r147130 --- gcc/ChangeLog | 8 ++++++++ gcc/Makefile.in | 37 +++++++++++++++++++++++++++++++++++++ gcc/config.gcc | 2 ++ 3 files changed, 47 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 228ddb4a21e..25b9af9a7a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-05-05 Rafael Avila de Espindola + + * Makefile.in (enable_plugin, plugin_includedir): New. + (install): Depend on install-plugin. + (PLUGIN_HEADERS): New. + (install-plugin): New. + * config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64. + 2009-05-05 Richard Guenther PR tree-optimization/40022 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 0e13e49eeec..89ac51606b9 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -286,6 +286,8 @@ CLOOGINC = @CLOOGINC@ # Libs and linker option needed for plugin support PLUGINLIBS = @pluginlibs@ +enable_plugin = @enable_plugin@ + CPPLIB = ../libcpp/libcpp.a CPPINC = -I$(srcdir)/../libcpp/include @@ -481,6 +483,8 @@ libexecdir = @libexecdir@ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version) # Directory in which the compiler finds executables libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version) +# Directory in which plugin headers are installed +plugin_includedir = $(libsubdir)/plugin/include # Used to produce a relative $(gcc_tooldir) in gcc.o unlibsubdir = ../../.. # $(prefix), expressed as a path relative to $(libsubdir). @@ -3973,6 +3977,10 @@ install: install-common $(INSTALL_HEADERS) \ install-cpp install-man install-info install-@POSUB@ \ install-driver +ifeq ($(enable_plugin),yes) +install: install-plugin +endif + # Handle cpp installation. install-cpp: installdirs cpp$(exeext) -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) @@ -3994,6 +4002,35 @@ installdirs: $(mkinstalldirs) $(DESTDIR)$(man1dir) $(mkinstalldirs) $(DESTDIR)$(man7dir) +PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + $(TOPLEV_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_PASS_H) gcc-plugin.h intl.h \ + $(PLUGIN_VERSION_H) + +# Install the headers needed to build a plugin. +install-plugin: installdirs +# 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) + headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\n' | sort -u`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ + path=$$file; \ + elif [ -f $(srcdir)/$$file ]; then \ + path=$(srcdir)/$$file; \ + else continue; \ + fi; \ + case $$path in \ + "$(srcdir)"*/config/* | "$(srcdir)"*.def ) \ + base=`echo $$path | sed "s|$(srcdir)||"`;; \ + *) base=`basename $$path` ;; \ + esac; \ + dest=$(plugin_includedir)/$$base; \ + echo $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \ + dir=`dirname $$dest`; \ + $(mkinstalldirs) $$dir; \ + $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \ + done + # Install the compiler executables built during cross compilation. install-common: native lang.install-common installdirs for file in $(COMPILERS); do \ diff --git a/gcc/config.gcc b/gcc/config.gcc index 856a70bbf28..503babea088 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -375,12 +375,14 @@ i[34567]86-*-*) if test "x$enable_cld" = xyes; then tm_defines="${tm_defines} USE_IX86_CLD=1" fi + tm_file="vxworks-dummy.h ${tm_file}" ;; x86_64-*-*) tm_file="i386/biarch64.h ${tm_file}" if test "x$enable_cld" = xyes; then tm_defines="${tm_defines} USE_IX86_CLD=1" fi + tm_file="vxworks-dummy.h ${tm_file}" ;; esac -- 2.30.2