Browse Source

gcc: Move headers in their own directory.

* gcc-plugin/src/opencl.h, gcc-plugin/src/tasks.h,
  gcc-plugin/src/utils.h, gcc-plugin/src/warn-unregistered.h: Move to
  ../include/starpu-gcc.  Adjust users accordingly.
* gcc-plugin/src/starpu-gcc-config.h.in: Move to...
* gcc-plugin/include/starpu-gcc/config.h.in: New file.  Adjust users
  accordingly.

* configure.ac: Generate gcc-plugin/include/starpu-gcc/config.h.
* gcc-plugin/Makefile.am (noinst_HEADERS): New variable.
* gcc-plugin/src/Makefile.am (noinst_HEADERS): Remove.
  (AM_CPPFLAGS): Remove -I$(srcdir); add new -Is.
Ludovic Courtès 12 years ago
parent
commit
22a29db265

+ 1 - 1
.gitignore

@@ -23,7 +23,7 @@ Makefile.in
 .dirstamp
 stamp-h[0-9]*
 starpu.log
-/gcc-plugin/src/starpu-gcc-config.h
+/gcc-plugin/include/starpu-gcc/config.h
 /gcc-plugin/tests/*.c.[0-9]*.*
 /tests/datawizard/handle_to_pointer
 /tests/datawizard/data_lookup

+ 1 - 1
configure.ac

@@ -1789,7 +1789,7 @@ if test -d /etc/OpenCL/vendors; then
 fi
 
 AC_CONFIG_FILES(tests/regression/regression.sh tests/regression/profiles tests/regression/profiles.build.only)
-AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h gcc-plugin/src/starpu-gcc-config.h starpu-top/config.h)
+AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h gcc-plugin/include/starpu-gcc/config.h starpu-top/config.h)
 
 AC_OUTPUT([
 	Makefile

+ 11 - 1
gcc-plugin/Makefile.am

@@ -18,7 +18,17 @@ if BUILD_EXAMPLES
 SUBDIRS += examples
 endif
 
-EXTRA_DIST = COPYING README ChangeLog
+EXTRA_DIST =					\
+  COPYING					\
+  README					\
+  ChangeLog
+
+noinst_HEADERS =				\
+  include/starpu-gcc/opencl.h			\
+  include/starpu-gcc/tasks.h			\
+  include/starpu-gcc/utils.h			\
+  include/starpu-gcc/warn-unregistered.h
+
 
 showcheck:
 	for i in $(SUBDIRS) ; do \

gcc-plugin/src/starpu-gcc-config.h.in → gcc-plugin/include/starpu-gcc/config.h.in


+ 1 - 1
gcc-plugin/src/opencl.h

@@ -20,7 +20,7 @@
 #include <tree.h>
 #include <cpplib.h>
 
-#include <utils.h>
+#include <starpu-gcc/utils.h>
 
 extern tree opencl_include_dirs;
 

+ 2 - 2
gcc-plugin/src/tasks.h

@@ -18,9 +18,9 @@
 
 #pragma once
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
-#include <utils.h>
+#include <starpu-gcc/utils.h>
 #include <starpu.h>
 
 

+ 1 - 1
gcc-plugin/src/utils.h

@@ -18,7 +18,7 @@
 
 #pragma once
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
 #include <unistd.h>
 

gcc-plugin/src/warn-unregistered.h → gcc-plugin/include/starpu-gcc/warn-unregistered.h


+ 2 - 7
gcc-plugin/src/Makefile.am

@@ -31,18 +31,13 @@ starpu_la_SOURCES += warn-unregistered.c
 
 endif
 
-noinst_HEADERS =				\
-  opencl.h					\
-  tasks.h					\
-  utils.h					\
-  warn-unregistered.h
-
 # Use the Yacc-compatibility mode so that Bison doesn't error out upon
 # reduce/reduce conflicts.
 AM_YFLAGS = -y
 
 AM_CPPFLAGS =						\
-  -I$(srcdir)						\
+  -I$(top_builddir)/gcc-plugin/include			\
+  -I$(top_srcdir)/gcc-plugin/include			\
   -I$(top_srcdir)/include				\
   -I$(GCC_PLUGIN_INCLUDE_DIR) -Wall -DYYERROR_VERBOSE=1	\
   $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)

+ 1 - 1
gcc-plugin/src/c-expr.y

@@ -23,7 +23,7 @@
 %debug
 
 %{
-  #include <starpu-gcc-config.h>
+  #include <starpu-gcc/config.h>
 
   #include <gcc-plugin.h>
   #include <plugin.h>

+ 3 - 3
gcc-plugin/src/opencl.c

@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with GCC-StarPU.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
 #include <stdlib.h>
 #include <unistd.h>
@@ -37,8 +37,8 @@
 # include <c-common.h>
 #endif
 
-#include <utils.h>
-#include <tasks.h>
+#include <starpu-gcc/utils.h>
+#include <starpu-gcc/tasks.h>
 
 
 /* Search path for OpenCL source files for the `opencl' pragma, as a

+ 5 - 6
gcc-plugin/src/starpu.c

@@ -17,7 +17,7 @@
 /* Use extensions of the GNU C Library.  */
 #define _GNU_SOURCE 1
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 /* We must include starpu.h here, otherwise gcc will complain about a poisoned
    malloc in xmmintrin.h. */
 #include <starpu.h>  /* for `STARPU_CPU' & co.  */
@@ -55,11 +55,10 @@
 #include <stdio.h>
 #include <sys/mman.h>
 
-/* GCC-StarPU headers.  */
-#include <utils.h>
-#include <tasks.h>
-#include <warn-unregistered.h>
-#include <opencl.h>
+#include <starpu-gcc/utils.h>
+#include <starpu-gcc/tasks.h>
+#include <starpu-gcc/warn-unregistered.h>
+#include <starpu-gcc/opencl.h>
 
 /* Don't include the dreaded proprietary headers that we don't need anyway.
    In particular, this waives the obligation to reproduce their silly

+ 4 - 4
gcc-plugin/src/tasks.c

@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with GCC-StarPU.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
 #include <gcc-plugin.h>
 #include <plugin-version.h>
@@ -31,9 +31,9 @@
 # include <c-common.h>
 #endif
 
-#include <tasks.h>
-#include <utils.h>
-#include <opencl.h>
+#include <starpu-gcc/tasks.h>
+#include <starpu-gcc/utils.h>
+#include <starpu-gcc/opencl.h>
 #include <starpu.h>
 
 

+ 2 - 2
gcc-plugin/src/utils.c

@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with GCC-StarPU.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
 #include <gcc-plugin.h>
 #include <plugin-version.h>
@@ -31,7 +31,7 @@
 # include <c-common.h>
 #endif
 
-#include <utils.h>
+#include <starpu-gcc/utils.h>
 #include <starpu.h>
 
 /* Whether to enable verbose output.  */

+ 3 - 3
gcc-plugin/src/warn-unregistered.c

@@ -17,7 +17,7 @@
 /* Use extensions of the GNU C Library.  */
 #define _GNU_SOURCE 1
 
-#include <starpu-gcc-config.h>
+#include <starpu-gcc/config.h>
 
 #include <gcc-plugin.h>
 #include <plugin-version.h>
@@ -30,8 +30,8 @@
 #include <diagnostic.h>
 #include <cgraph.h>
 
-#include <utils.h>
-#include <tasks.h>
+#include <starpu-gcc/utils.h>
+#include <starpu-gcc/tasks.h>
 
 /* Return true if there exists a `starpu_vector_data_register' call for VAR
    before GSI in its basic block.  */