[Mesa-dev] [PATCH 06/14] util/gen_xmlpool: Remove --meson option for gen_xmlpool
Dylan Baker
dylan at pnwbakers.com
Fri Oct 26 17:23:35 UTC 2018
Autotools now uses the same layout as meson, and scons doesn't care, so
remove the separate paths.
---
src/util/Android.mk | 2 +-
src/util/xmlpool/Makefile.am | 2 +-
src/util/xmlpool/gen_xmlpool.py | 10 +++-------
src/util/xmlpool/meson.build | 2 +-
4 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/util/Android.mk b/src/util/Android.mk
index 6c4c90e951d..993a7f179f4 100644
--- a/src/util/Android.mk
+++ b/src/util/Android.mk
@@ -102,7 +102,7 @@ $(UTIL_GENERATED_SOURCES): $(intermediates)/%.c: $(LOCAL_PATH)/%.py
$(transform-generated-source)
$(MESA_DRI_OPTIONS_H): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $< $(PRIVATE_TEMPLATE_HEADER) \
- $(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) --meson > $@
+ $(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) > $@
$(MESA_DRI_OPTIONS_H): $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) $(PRIVATE_MO_FILES)
$(transform-generated-source)
diff --git a/src/util/xmlpool/Makefile.am b/src/util/xmlpool/Makefile.am
index 2227f57369e..9d5977f86ce 100644
--- a/src/util/xmlpool/Makefile.am
+++ b/src/util/xmlpool/Makefile.am
@@ -75,7 +75,7 @@ clean-local:
# Default target options.h
LOCALEDIR := .
options.h: t_options.h $(MOS)
- $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py --meson $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h
# Update .mo files from the corresponding .po files.
%.gmo: %.po
diff --git a/src/util/xmlpool/gen_xmlpool.py b/src/util/xmlpool/gen_xmlpool.py
index e83e689de47..0ad51eaa785 100644
--- a/src/util/xmlpool/gen_xmlpool.py
+++ b/src/util/xmlpool/gen_xmlpool.py
@@ -19,7 +19,6 @@ parser = argparse.ArgumentParser()
parser.add_argument('template')
parser.add_argument('localedir')
parser.add_argument('languages', nargs='*')
-parser.add_argument('--meson', action='store_true')
args = parser.parse_args()
if sys.version_info < (3, 0):
@@ -167,12 +166,9 @@ def expandMatches (matches, translations, end=None):
translations = [("en", gettext.NullTranslations())]
for lang in args.languages:
try:
- if args.meson:
- filename = os.path.join(args.localedir, '{}.gmo'.format(lang))
- with io.open(filename, 'rb') as f:
- trans = gettext.GNUTranslations(f)
- else:
- trans = gettext.translation ("options", args.localedir, [lang])
+ filename = os.path.join(args.localedir, '{}.gmo'.format(lang))
+ with io.open(filename, 'rb') as f:
+ trans = gettext.GNUTranslations(f)
except (IOError, OSError):
sys.stderr.write ("Warning: language '%s' not found.\n" % lang)
continue
diff --git a/src/util/xmlpool/meson.build b/src/util/xmlpool/meson.build
index 381905b432a..ae7c951a097 100644
--- a/src/util/xmlpool/meson.build
+++ b/src/util/xmlpool/meson.build
@@ -30,7 +30,7 @@ xmlpool_options_h = custom_target(
input : ['gen_xmlpool.py', 't_options.h'],
output : 'options.h',
command : [
- prog_python, '@INPUT@', '--meson', meson.current_build_dir(), _langs,
+ prog_python, '@INPUT@', meson.current_build_dir(), _langs,
],
capture : true,
depend_files : _langs_po_files,
--
2.19.1
More information about the mesa-dev
mailing list