From: Dan Nicholson Date: Tue, 15 Jan 2008 17:52:17 +0000 (-0800) Subject: glapi: Use variable for indent and flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=817af9bec2f799b4b8449112d1a25aad70ca4d15;p=mesa.git glapi: Use variable for indent and flags Put the path to indent and the flags to call it with in configs/default rather than in the Makefile. This makes it easier to change the values globally. --- diff --git a/configs/default b/configs/default index cd998b50e2d..9705d6b78c0 100644 --- a/configs/default +++ b/configs/default @@ -30,9 +30,11 @@ MKDEP_OPTIONS = -fdepend MAKE = make INSTALL = $(TOP)/bin/minstall -# Python and flags (generally only needed by the developers) +# Tools for regenerating glapi (generally only needed by the developers) PYTHON2 = python PYTHON_FLAGS = -t -O -O +INDENT = indent +INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool # Library names (base name) GL_LIB = GL diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile index c52c0903478..0487a31ac7b 100644 --- a/src/mesa/glapi/Makefile +++ b/src/mesa/glapi/Makefile @@ -39,8 +39,6 @@ API_XML = gl_API.xml \ COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py -INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool - all: $(OUTPUTS) server: $(SERVER_OUTPUTS) @@ -77,7 +75,7 @@ dispatch.h: $(COMMON) gl_table.py $(PYTHON2) $(PYTHON_FLAGS) extension_helper.py > ../drivers/dri/common/extension_helper.h ../../glx/x11/indirect.c: $(COMMON_GLX) glX_proto_send.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m proto | indent $(INDENT_FLAGS) > ../../glx/x11/indirect.c + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m proto | $(INDENT) $(INDENT_FLAGS) > ../../glx/x11/indirect.c ../../glx/x11/indirect.h: $(COMMON_GLX) glX_proto_send.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_h > ../../glx/x11/indirect.h @@ -86,10 +84,10 @@ dispatch.h: $(COMMON) gl_table.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_c > ../../glx/x11/indirect_init.c ../../glx/x11/indirect_size.h: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.h + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ | $(INDENT) $(INDENT_FLAGS) > ../../glx/x11/indirect_size.h ../../glx/x11/indirect_size.c: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c --only-set | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.c + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c --only-set | $(INDENT) $(INDENT_FLAGS) > ../../glx/x11/indirect_size.c $(GLX_DIR)/indirect_dispatch.c: $(COMMON_GLX) glX_proto_recv.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_c > $@ @@ -101,16 +99,16 @@ $(GLX_DIR)/indirect_dispatch.h: $(COMMON_GLX) glX_proto_recv.py glX_API.xml $(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_h -f gl_and_glX_API.xml -s > $@ $(GLX_DIR)/indirect_size_get.h: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) > $@ + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' | $(INDENT) $(INDENT_FLAGS) > $@ $(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@ + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | $(INDENT) $(INDENT_FLAGS) > $@ $(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) -l200 > $@ + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | $(INDENT) $(INDENT_FLAGS) -l200 > $@ $(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py - $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@ + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@ $(GLX_DIR)/indirect_table.c: $(COMMON_GLX) glX_server_table.py glX_API.xml $(PYTHON2) $(PYTHON_FLAGS) glX_server_table.py -f gl_and_glX_API.xml > $@