mesa: rename format_info.c to format_info.h
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 2 Mar 2015 15:58:17 +0000 (15:58 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 5 Mar 2015 14:45:54 +0000 (14:45 +0000)
The file is auto-generated, and #included by formats.c. Let's rename it
to reflect the latter. This will also help up fix the dependency
tracking by adding it to the _SOURCES variable, without the side effect
of it being compiled (twice).

v2: Update .gitignore to reflect the rename.

Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/Android.gen.mk
src/mesa/Makefile.am
src/mesa/SConscript
src/mesa/main/.gitignore
src/mesa/main/formats.c

index c7b7f7edf3066e11a69d1a0e3655db893de05ce4..caae2c107a19e18d82f7fd9259da9481246f7857 100644 (file)
@@ -122,5 +122,5 @@ format_info_deps := \
        $(LOCAL_PATH)/main/format_parser.py \
        $(FORMAT_INFO)
 
-$(intermediates)/main/format_info.c: $(format_info_deps)
+$(intermediates)/main/format_info.h: $(format_info_deps)
        @$(MESA_PYTHON2) $(FORMAT_INFO) $< > $@
index 467492f55c1850030f6adf833f61d20fcbda581e..5f9ee1e25ffa0800209bcc788b38d1ba5b8f96d1 100644 (file)
@@ -79,7 +79,7 @@ EXTRA_DIST = \
 
 BUILT_SOURCES = \
        main/get_hash.h \
-        main/format_info.c \
+       main/format_info.h \
        main/git_sha1.h \
        main/format_pack.c \
        main/format_unpack.c \
@@ -99,7 +99,7 @@ main/get_hash.h: ../mapi/glapi/gen/gl_and_es_API.xml main/get_hash_params.py  \
                -f $< > $@.tmp;                                         \
        mv $@.tmp $@;
 
-main/format_info.c: main/formats.csv                                    \
+main/format_info.h: main/formats.csv                                    \
                     main/format_parser.py main/format_info.py
        $(AM_V_GEN)set -e;                                              \
        $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/format_info.py        \
@@ -122,7 +122,7 @@ main/format_unpack.c: main/format_unpack.py main/formats.csv        \
                        $(srcdir)/main/formats.csv                      \
                | $(INDENT) $(INDENT_FLAGS) > $@;
 
-main/formats.c: main/format_info.c
+main/formats.c: main/format_info.h
 
 noinst_LTLIBRARIES = $(ARCH_LIBS)
 if NEED_LIBMESA
index d6ff0835445dd5c51cd9f9b87f48370a96b3785d..81939f981ca112d7435f08cc87a4155911e4b528 100644 (file)
@@ -64,7 +64,7 @@ get_hash_header = env.CodeGenerate(
 )
 
 format_info = env.CodeGenerate(
-      target = 'main/format_info.c',
+      target = 'main/format_info.h',
       script = 'main/format_info.py',
       source = 'main/formats.csv',
       command = python_cmd + ' $SCRIPT ' + ' $SOURCE > $TARGET'
index 98e645efbe8d884fb3f529f6e9f6c345bb8117f5..8256ad7923eb608cd525339801acd7b72b310a61 100644 (file)
@@ -6,6 +6,6 @@ git_sha1.h.tmp
 remap_helper.h
 get_hash.h
 get_hash.h.tmp
-format_info.c
+format_info.h
 format_pack.c
 format_unpack.c
index a6f5cde0c57588e107440ec8c871cefc3db7113c..422c9dc46eba0f35e1c329d17c519756823ff82c 100644 (file)
@@ -75,7 +75,7 @@ struct gl_format_info
    mesa_array_format ArrayFormat;
 };
 
-#include "format_info.c"
+#include "format_info.h"
 
 static const struct gl_format_info *
 _mesa_get_format_info(mesa_format format)