mapi_abi.py: remove no longer used --mode option

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Emil Velikov 2017-04-13 18:42:37 +01:00 committed by Emil Velikov
parent 3698fe295a
commit d230ef842c
5 changed files with 8 additions and 13 deletions

View File

@ -75,4 +75,4 @@ $(mapi_abi_headers): PRIVATE_APIXML := $(LOCAL_PATH)/glapi/gen/gl_and_es_API.xml
$(mapi_abi_headers): $(mapi_abi_deps)
@mkdir -p $(dir $@)
@echo "target $(PRIVATE_PRINTER): $(PRIVATE_MODULE) <= $(PRIVATE_APIXML)"
$(hide) $(PRIVATE_SCRIPT) --printer $(PRIVATE_PRINTER) --mode lib $(PRIVATE_APIXML) > $@
$(hide) $(PRIVATE_SCRIPT) --printer $(PRIVATE_PRINTER) $(PRIVATE_APIXML) > $@

View File

@ -93,7 +93,7 @@ endif
shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer shared-glapi \
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer shared-glapi \
$(srcdir)/glapi/gen/gl_and_es_API.xml > $@
if HAVE_OPENGL
@ -192,7 +192,7 @@ endif
es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es1api \
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es1api \
$(srcdir)/glapi/gen/gl_and_es_API.xml > $@
if HAVE_OPENGL_ES2
@ -237,7 +237,7 @@ endif
es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es2api \
$(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es2api \
$(srcdir)/glapi/gen/gl_and_es_API.xml > $@
include $(top_srcdir)/install-lib-links.mk

View File

@ -259,7 +259,7 @@ $(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h
$(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON)
$(PYTHON_GEN) $(MESA_MAPI_DIR)/mapi_abi.py \
--printer glapi --mode lib $(srcdir)/gl_and_es_API.xml > $@
--printer glapi $(srcdir)/gl_and_es_API.xml > $@
$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
$(PYTHON_GEN) $(srcdir)/gl_procs.py -c -f $(srcdir)/gl_and_es_API.xml > $@

View File

@ -771,17 +771,13 @@ typedef int GLclampx;
def parse_args():
printers = ['glapi', 'es1api', 'es2api', 'shared-glapi']
modes = ['lib', 'app']
parser = OptionParser(usage='usage: %prog [options] <filename>')
parser.add_option('-p', '--printer', dest='printer',
help='printer to use: %s' % (", ".join(printers)))
parser.add_option('-m', '--mode', dest='mode',
help='target user: %s' % (", ".join(modes)))
options, args = parser.parse_args()
if not args or options.printer not in printers or \
options.mode not in modes:
if not args or options.printer not in printers:
parser.print_help()
sys.exit(1)
@ -804,8 +800,7 @@ def main():
abi_sanity_check(entries)
printer = printers[options.printer](entries)
if options.mode == 'lib':
printer.output_for_lib()
printer.output_for_lib()
if __name__ == '__main__':
main()

View File

@ -32,7 +32,7 @@ def mapi_objects(env, printer, mode):
script = '../mapi_abi.py',
source = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml'),
command = python_cmd + ' $SCRIPT ' + \
'--printer %s --mode lib $SOURCE > $TARGET' % (printer),
'--printer %s $SOURCE > $TARGET' % (printer),
)
cpppath = [