Skip to content
Snippets Groups Projects
Commit 97b0219e authored by Emil Velikov's avatar Emil Velikov
Browse files

mesa: rename format_info.c to format_info.h


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: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
(cherry picked from commit 3f6c28f2)

Conflicts:
	src/mesa/Makefile.am
	src/mesa/main/.gitignore
parent 93273f16
No related branches found
No related tags found
No related merge requests found
......@@ -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) $< > $@
......@@ -64,7 +64,7 @@ include Makefile.sources
BUILT_SOURCES = \
main/get_hash.h \
main/format_info.c \
main/format_info.h \
$(BUILDDIR)main/git_sha1.h \
$(BUILDDIR)program/program_parse.tab.c \
$(BUILDDIR)program/lex.yy.c
......@@ -82,14 +82,14 @@ main/get_hash.h: $(GLAPI)/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 \
$< > $@.tmp; \
mv $@.tmp $@;
main/formats.c: main/format_info.c
main/formats.c: main/format_info.h
noinst_LTLIBRARIES = $(ARCH_LIBS)
if NEED_LIBMESA
......
......@@ -60,7 +60,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'
......
......@@ -8,4 +8,4 @@ git_sha1.h.tmp
remap_helper.h
get_hash.h
get_hash.h.tmp
format_info.c
format_info.h
......@@ -73,7 +73,7 @@ struct gl_format_info
uint8_t Swizzle[4];
};
#include "format_info.c"
#include "format_info.h"
static const struct gl_format_info *
_mesa_get_format_info(mesa_format format)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment