summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-06-30 11:57:06 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-07-13 13:27:45 +0200
commitee016feee98f1548294a2f52a86959d18fcdba10 (patch)
treea7cebf9782ee8a40d68334228f4cc1ae5b0d5ffe
parent8cb775282bcd2a13c9ee3373d3f930d70bfa1edf (diff)
xmlconfig: move into src/util
-rw-r--r--configure.ac2
-rw-r--r--src/gallium/state_trackers/dri/Makefile.am2
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c2
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.h2
-rw-r--r--src/gallium/targets/d3dadapter9/Makefile.am1
-rw-r--r--src/gallium/targets/d3dadapter9/drm.c4
-rw-r--r--src/loader/Makefile.am4
-rw-r--r--src/loader/loader.c4
-rw-r--r--src/mesa/drivers/SConscript1
-rw-r--r--src/mesa/drivers/dri/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/common/Android.mk48
-rw-r--r--src/mesa/drivers/dri/common/Makefile.am12
-rw-r--r--src/mesa/drivers/dri/common/Makefile.sources4
-rw-r--r--src/mesa/drivers/dri/common/SConscript7
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c2
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h2
-rw-r--r--src/mesa/drivers/dri/i915/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c2
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.h2
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.h2
-rw-r--r--src/mesa/drivers/dri/r200/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c2
-rw-r--r--src/mesa/drivers/dri/radeon/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c2
-rw-r--r--src/mesa/drivers/dri/swrast/Makefile.am2
-rw-r--r--src/util/Android.mk47
-rw-r--r--src/util/Makefile.am20
-rw-r--r--src/util/Makefile.sources4
-rw-r--r--src/util/SConscript16
-rw-r--r--src/util/drirc (renamed from src/mesa/drivers/dri/common/drirc)0
-rw-r--r--src/util/xmlconfig.c (renamed from src/mesa/drivers/dri/common/xmlconfig.c)0
-rw-r--r--src/util/xmlconfig.h (renamed from src/mesa/drivers/dri/common/xmlconfig.h)0
-rw-r--r--src/util/xmlpool.h (renamed from src/mesa/drivers/dri/common/xmlpool.h)0
-rw-r--r--src/util/xmlpool/.gitignore (renamed from src/mesa/drivers/dri/common/xmlpool/.gitignore)0
-rw-r--r--src/util/xmlpool/Makefile.am (renamed from src/mesa/drivers/dri/common/xmlpool/Makefile.am)0
-rw-r--r--src/util/xmlpool/SConscript (renamed from src/mesa/drivers/dri/common/xmlpool/SConscript)0
-rw-r--r--src/util/xmlpool/ca.po (renamed from src/mesa/drivers/dri/common/xmlpool/ca.po)0
-rw-r--r--src/util/xmlpool/de.po (renamed from src/mesa/drivers/dri/common/xmlpool/de.po)0
-rw-r--r--src/util/xmlpool/es.po (renamed from src/mesa/drivers/dri/common/xmlpool/es.po)0
-rw-r--r--src/util/xmlpool/fr.po (renamed from src/mesa/drivers/dri/common/xmlpool/fr.po)0
-rw-r--r--src/util/xmlpool/gen_xmlpool.py (renamed from src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py)0
-rw-r--r--src/util/xmlpool/nl.po (renamed from src/mesa/drivers/dri/common/xmlpool/nl.po)0
-rw-r--r--src/util/xmlpool/sv.po (renamed from src/mesa/drivers/dri/common/xmlpool/sv.po)0
-rw-r--r--src/util/xmlpool/t_options.h (renamed from src/mesa/drivers/dri/common/xmlpool/t_options.h)0
54 files changed, 117 insertions, 107 deletions
diff --git a/configure.ac b/configure.ac
index 61d98e28e0..0352c9bfcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2836,7 +2836,6 @@ AC_CONFIG_FILES([Makefile
src/mesa/gl.pc
src/mesa/drivers/dri/dri.pc
src/mesa/drivers/dri/common/Makefile
- src/mesa/drivers/dri/common/xmlpool/Makefile
src/mesa/drivers/dri/i915/Makefile
src/mesa/drivers/dri/i965/Makefile
src/mesa/drivers/dri/Makefile
@@ -2850,6 +2849,7 @@ AC_CONFIG_FILES([Makefile
src/mesa/main/tests/Makefile
src/util/Makefile
src/util/tests/hash_table/Makefile
+ src/util/xmlpool/Makefile
src/vulkan/Makefile])
AC_OUTPUT
diff --git a/src/gallium/state_trackers/dri/Makefile.am b/src/gallium/state_trackers/dri/Makefile.am
index 61a1cabeb8..8b427f98ac 100644
--- a/src/gallium/state_trackers/dri/Makefile.am
+++ b/src/gallium/state_trackers/dri/Makefile.am
@@ -28,7 +28,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(GALLIUM_CFLAGS) \
$(LIBDRM_CFLAGS) \
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 6b58830e0b..3d86cce2bc 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -30,7 +30,7 @@
*/
#include "utils.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
#include "dri_screen.h"
#include "dri_context.h"
diff --git a/src/gallium/state_trackers/dri/dri_screen.h b/src/gallium/state_trackers/dri/dri_screen.h
index 550bc510ce..383e762393 100644
--- a/src/gallium/state_trackers/dri/dri_screen.h
+++ b/src/gallium/state_trackers/dri/dri_screen.h
@@ -33,7 +33,7 @@
#define DRI_SCREEN_H
#include "dri_util.h"
-#include "xmlconfig.h"
+#include "util/xmlconfig.h"
#include "pipe/p_compiler.h"
#include "pipe/p_context.h"
diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am
index 8f2a6f5601..824e8d6b93 100644
--- a/src/gallium/targets/d3dadapter9/Makefile.am
+++ b/src/gallium/targets/d3dadapter9/Makefile.am
@@ -27,7 +27,6 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/mapi/ \
-I$(top_srcdir)/src/mesa/ \
- -I$(top_builddir)/src/mesa/drivers/dri/common/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/gallium/state_trackers/nine \
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c
index 27c3fb1675..c0ed97a6fb 100644
--- a/src/gallium/targets/d3dadapter9/drm.c
+++ b/src/gallium/targets/d3dadapter9/drm.c
@@ -37,8 +37,8 @@
#include "d3dadapter/d3dadapter9.h"
#include "d3dadapter/drm.h"
-#include "xmlconfig.h"
-#include "xmlpool.h"
+#include "util/xmlconfig.h"
+#include "util/xmlpool.h"
#include <drm.h>
#include <sys/ioctl.h>
diff --git a/src/loader/Makefile.am b/src/loader/Makefile.am
index 340b335ca9..8b197f2995 100644
--- a/src/loader/Makefile.am
+++ b/src/loader/Makefile.am
@@ -39,14 +39,14 @@ libloader_la_LIBADD =
if HAVE_DRICOMMON
libloader_la_CPPFLAGS += \
- -I$(top_builddir)/src/mesa/drivers/dri/common/ \
+ -I$(top_builddir)/src/util/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mapi/ \
-DUSE_DRICONF
libloader_la_LIBADD += \
- $(top_builddir)/src/mesa/drivers/dri/common/libxmlconfig.la
+ $(top_builddir)/src/util/libxmlconfig.la
endif
diff --git a/src/loader/loader.c b/src/loader/loader.c
index c3fc961be5..182ba90a0d 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -46,8 +46,8 @@
#ifdef HAVE_LIBDRM
#include <xf86drm.h>
#ifdef USE_DRICONF
-#include "xmlconfig.h"
-#include "xmlpool.h"
+#include "util/xmlconfig.h"
+#include "util/xmlpool.h"
#endif
#endif
diff --git a/src/mesa/drivers/SConscript b/src/mesa/drivers/SConscript
index 476425be27..f549910336 100644
--- a/src/mesa/drivers/SConscript
+++ b/src/mesa/drivers/SConscript
@@ -7,6 +7,5 @@ if env['x11']:
if env['dri']:
SConscript([
- 'dri/common/xmlpool/SConscript',
'dri/common/SConscript',
])
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 381c6a20b7..95c637d0cd 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -65,7 +65,7 @@ mesa_dri_drivers_la_LIBADD = \
../../libmesa.la \
common/libmegadriver_stub.la \
common/libdricommon.la \
- common/libxmlconfig.la \
+ $(top_builddir)/src/util/libxmlconfig.la \
$(top_builddir)/src/mapi/shared-glapi/libglapi.la \
$(MEGADRIVERS_DEPS) \
$(DRI_LIB_DEPS) \
diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk
index 8a21e63032..573189d88f 100644
--- a/src/mesa/drivers/dri/common/Android.mk
+++ b/src/mesa/drivers/dri/common/Android.mk
@@ -44,53 +44,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(intermediates)
LOCAL_SRC_FILES := \
- $(DRI_COMMON_FILES) \
- $(XMLCONFIG_FILES)
-
-MESA_DRI_OPTIONS_H := $(intermediates)/xmlpool/options.h
-LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H)
-
-#
-# Generate options.h from gettext translations.
-#
-
-MESA_DRI_OPTIONS_LANGS := de es nl fr sv
-POT := $(intermediates)/xmlpool.pot
-
-$(POT): $(LOCAL_PATH)/xmlpool/t_options.h
- @mkdir -p $(dir $@)
- xgettext -L C --from-code utf-8 -o $@ $<
-
-$(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
- lang=$(basename $(notdir $@)); \
- mkdir -p $(dir $@); \
- if [ -f $< ]; then \
- msgmerge -o $@ $^; \
- else \
- msginit -i $(POT) \
- -o $@ \
- --locale=$$lang \
- --no-translator; \
- sed -i -e 's/charset=.*\\n/charset=UTF-8\\n/' $@; \
- fi
-
-PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
-PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
-PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
-PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
-
-LOCAL_GENERATED_SOURCES += $(PRIVATE_MO_FILES)
-
-$(PRIVATE_MO_FILES): $(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
- mkdir -p $(dir $@)
- msgfmt -o $@ $<
-
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ $(PRIVATE_TEMPLATE_HEADER) \
- $(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) > $@
-
-$(MESA_DRI_OPTIONS_H): $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) $(PRIVATE_MO_FILES)
- $(transform-generated-source)
+ $(DRI_COMMON_FILES)
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/mesa/drivers/dri/common/Makefile.am b/src/mesa/drivers/dri/common/Makefile.am
index c85c470a2f..2582cbee56 100644
--- a/src/mesa/drivers/dri/common/Makefile.am
+++ b/src/mesa/drivers/dri/common/Makefile.am
@@ -19,11 +19,9 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = xmlpool
-
include Makefile.sources
-EXTRA_DIST = drirc xmlpool.h SConscript
+EXTRA_DIST = SConscript
AM_CFLAGS = \
-I$(top_srcdir)/include \
@@ -34,20 +32,12 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary \
$(LIBDRM_CFLAGS) \
$(DEFINES) \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
$(VISIBILITY_CFLAGS)
noinst_LTLIBRARIES = \
libdricommon.la \
- libxmlconfig.la \
libmegadriver_stub.la
libdricommon_la_SOURCES = $(DRI_COMMON_FILES)
-libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
-libxmlconfig_la_CFLAGS = $(AM_CFLAGS) $(EXPAT_CFLAGS)
-libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
-
libmegadriver_stub_la_SOURCES = $(megadriver_stub_FILES)
-
-sysconf_DATA = drirc
diff --git a/src/mesa/drivers/dri/common/Makefile.sources b/src/mesa/drivers/dri/common/Makefile.sources
index 9d3cdd38ff..fdac0de829 100644
--- a/src/mesa/drivers/dri/common/Makefile.sources
+++ b/src/mesa/drivers/dri/common/Makefile.sources
@@ -4,10 +4,6 @@ DRI_COMMON_FILES := \
dri_util.c \
dri_util.h
-XMLCONFIG_FILES := \
- xmlconfig.c \
- xmlconfig.h
-
# Paths are relative to MESA_TOP.
mesa_dri_common_INCLUDES := \
include \
diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript
index 52d201f891..7a12438257 100644
--- a/src/mesa/drivers/dri/common/SConscript
+++ b/src/mesa/drivers/dri/common/SConscript
@@ -7,7 +7,6 @@ drienv = env.Clone()
drienv.Replace(CPPPATH = [
'#src/mesa/drivers/dri/common',
- xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
'#include',
'#include/GL/internal',
'#src',
@@ -28,11 +27,7 @@ drienv.Replace(CPPPATH = [
'#src/egl/drivers/dri',
])
-drienv.AppendUnique(LIBS = [
- 'expat',
-])
-
-sources = drienv.ParseSourceList('Makefile.sources', ['DRI_COMMON_FILES', 'XMLCONFIG_FILES' ])
+sources = drienv.ParseSourceList('Makefile.sources', ['DRI_COMMON_FILES'])
dri_common = drienv.ConvenienceLibrary(
target = 'dri_common',
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index f6df48802f..b1aec7ecf5 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -42,7 +42,7 @@
#include <stdbool.h>
#include "dri_util.h"
#include "utils.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
#include "main/mtypes.h"
#include "main/framebuffer.h"
#include "main/version.h"
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 8fcd6322d0..b353588272 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -56,7 +56,7 @@
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#include "main/mtypes.h"
-#include "xmlconfig.h"
+#include "util/xmlconfig.h"
#include <stdbool.h>
/**
diff --git a/src/mesa/drivers/dri/i915/Makefile.am b/src/mesa/drivers/dri/i915/Makefile.am
index feead3eb2d..70ca0490a3 100644
--- a/src/mesa/drivers/dri/i915/Makefile.am
+++ b/src/mesa/drivers/dri/i915/Makefile.am
@@ -30,7 +30,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(VISIBILITY_CFLAGS) \
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 686cbf5ec1..5e938178ad 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -39,7 +39,7 @@
#include "swrast/s_renderbuffer.h"
#include "utils.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
static const __DRIconfigOptionsExtension i915_config_options = {
.base = { __DRI_CONFIG_OPTIONS, 1 },
diff --git a/src/mesa/drivers/dri/i915/intel_screen.h b/src/mesa/drivers/dri/i915/intel_screen.h
index 11e1a3fa31..a22888b391 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.h
+++ b/src/mesa/drivers/dri/i915/intel_screen.h
@@ -33,7 +33,7 @@
#include "dri_util.h"
#include "intel_bufmgr.h"
#include "i915_drm.h"
-#include "xmlconfig.h"
+#include "util/xmlconfig.h"
struct intel_screen
{
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index ecc1e766f1..ec58e63648 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -30,7 +30,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/gtest/include \
-I$(top_builddir)/src/compiler/glsl \
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 6d0588e9cf..0a674fc448 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -41,7 +41,7 @@
#include "compiler/nir/nir.h"
#include "utils.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
#ifndef DRM_FORMAT_MOD_INVALID
#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h
index 0980c8f561..0c750befd1 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.h
+++ b/src/mesa/drivers/dri/i965/intel_screen.h
@@ -36,7 +36,7 @@
#include "brw_bufmgr.h"
#include "common/gen_device_info.h"
#include "i915_drm.h"
-#include "xmlconfig.h"
+#include "util/xmlconfig.h"
#include "isl/isl.h"
diff --git a/src/mesa/drivers/dri/r200/Makefile.am b/src/mesa/drivers/dri/r200/Makefile.am
index 1094343d60..110c02ed27 100644
--- a/src/mesa/drivers/dri/r200/Makefile.am
+++ b/src/mesa/drivers/dri/r200/Makefile.am
@@ -34,7 +34,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/r200/server \
$(DEFINES) \
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index aaa9b9317d..8dc2c11fb4 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -65,7 +65,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_span.h"
#include "utils.h"
-#include "xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/xmlpool.h" /* for symbolic values of enum-type options */
/* Return various strings for glGetString().
*/
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 4f584d3677..4b589cd8b8 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -49,7 +49,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_state.h"
#include "radeon_queryobj.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
/* New (1.3) state mechanism. 3 commands (packet, scalar, vector) in
* 1.3 cmdbuffers allow all previous state to be updated as well as
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 0ddb686a43..0696c0dc68 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -45,7 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_ioctl.h"
#include "r200_tex.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
diff --git a/src/mesa/drivers/dri/radeon/Makefile.am b/src/mesa/drivers/dri/radeon/Makefile.am
index 176ec797ef..aa898645c9 100644
--- a/src/mesa/drivers/dri/radeon/Makefile.am
+++ b/src/mesa/drivers/dri/radeon/Makefile.am
@@ -35,7 +35,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/radeon/server \
$(DEFINES) \
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 7789435376..7e24f6d7f7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
#include "radeon_common.h"
-#include "xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/xmlpool.h" /* for symbolic values of enum-type options */
#include "utils.h"
#include "drivers/common/meta.h"
#include "main/context.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 11afe20c6a..7cd58717fa 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -67,7 +67,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_fog.h"
#include "utils.h"
-#include "xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/xmlpool.h" /* for symbolic values of enum-type options */
extern const struct tnl_pipeline_stage _radeon_render_stage;
extern const struct tnl_pipeline_stage _radeon_tcl_stage;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 79e388988a..6c488b6c78 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -62,7 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Radeon configuration
*/
-#include "xmlpool.h"
+#include "util/xmlpool.h"
#define DRI_CONF_COMMAND_BUFFER_SIZE(def,min,max) \
DRI_CONF_OPT_BEGIN_V(command_buffer_size,int,def, # min ":" # max ) \
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h
index b3e926798c..e70e334aba 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -45,7 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "dri_util.h"
#include "radeon_chipset.h"
#include "radeon_reg.h"
-#include "xmlconfig.h"
+#include "util/xmlconfig.h"
typedef struct {
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 5e2f41fdb4..99c535a49c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -44,7 +44,7 @@
#include "../r200/r200_reg.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
/* New (1.3) state mechanism. 3 commands (packet, scalar, vector) in
* 1.3 cmdbuffers allow all previous state to be updated as well as
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index c3b83fab19..b4964f13cd 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -44,7 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_ioctl.h"
#include "radeon_tex.h"
-#include "xmlpool.h"
+#include "util/xmlpool.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 4794ddae06..f2d435a375 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -41,7 +41,7 @@
#include "main/texobj.h"
#include "drivers/common/meta.h"
-#include "xmlpool.h" /* for symbolic values of enum-type options */
+#include "util/xmlpool.h" /* for symbolic values of enum-type options */
#include "radeon_common.h"
diff --git a/src/mesa/drivers/dri/swrast/Makefile.am b/src/mesa/drivers/dri/swrast/Makefile.am
index a82e580f1d..7e1ea59e9b 100644
--- a/src/mesa/drivers/dri/swrast/Makefile.am
+++ b/src/mesa/drivers/dri/swrast/Makefile.am
@@ -30,7 +30,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_builddir)/src/util \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
$(LIBDRM_CFLAGS) \
$(DEFINES) \
diff --git a/src/util/Android.mk b/src/util/Android.mk
index facdcf8ed1..6c813225e7 100644
--- a/src/util/Android.mk
+++ b/src/util/Android.mk
@@ -31,7 +31,8 @@ include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- $(MESA_UTIL_FILES)
+ $(MESA_UTIL_FILES) \
+ $(XMLCONFIG_FILES)
LOCAL_C_INCLUDES := \
external/zlib \
@@ -49,10 +50,54 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES))
+MESA_DRI_OPTIONS_H := $(intermediates)/xmlpool/options.h
+LOCAL_GENERATED_SOURCES += $(MESA_DRI_OPTIONS_H)
+
+#
+# Generate options.h from gettext translations.
+#
+
+MESA_DRI_OPTIONS_LANGS := de es nl fr sv
+POT := $(intermediates)/xmlpool.pot
+
+$(POT): $(LOCAL_PATH)/xmlpool/t_options.h
+ @mkdir -p $(dir $@)
+ xgettext -L C --from-code utf-8 -o $@ $<
+
+$(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
+ lang=$(basename $(notdir $@)); \
+ mkdir -p $(dir $@); \
+ if [ -f $< ]; then \
+ msgmerge -o $@ $^; \
+ else \
+ msginit -i $(POT) \
+ -o $@ \
+ --locale=$$lang \
+ --no-translator; \
+ sed -i -e 's/charset=.*\\n/charset=UTF-8\\n/' $@; \
+ fi
+
+PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
+PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
+PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
+PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
+
+LOCAL_GENERATED_SOURCES += $(PRIVATE_MO_FILES)
+
+$(PRIVATE_MO_FILES): $(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
+ mkdir -p $(dir $@)
+ msgfmt -o $@ $<
+
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
$(LOCAL_GENERATED_SOURCES): $(intermediates)/%.c: $(LOCAL_PATH)/%.py
$(transform-generated-source)
+$(PRIVATE_MO_FILES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ $(PRIVATE_TEMPLATE_HEADER) \
+ $(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) > $@
+
+$(MESA_DRI_OPTIONS_H): $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) $(PRIVATE_MO_FILES)
+ $(transform-generated-source)
+
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index f094eb4a0d..fa6551eaa5 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -19,11 +19,13 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = . tests/hash_table
+SUBDIRS = xmlpool . tests/hash_table
include Makefile.sources
-noinst_LTLIBRARIES = libmesautil.la
+noinst_LTLIBRARIES = \
+ libmesautil.la \
+ libxmlconfig.la
AM_CPPFLAGS = \
-I$(top_srcdir)/include
@@ -46,6 +48,18 @@ libmesautil_la_SOURCES = \
libmesautil_la_LIBADD = $(ZLIB_LIBS)
+libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
+libxmlconfig_la_CFLAGS = \
+ $(DEFINES) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ $(VISIBILITY_CFLAGS) \
+ $(EXPAT_CFLAGS)
+libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
+
+sysconf_DATA = drirc
+
roundeven_test_LDADD = -lm
check_PROGRAMS = u_atomic_test roundeven_test
@@ -54,8 +68,10 @@ TESTS = $(check_PROGRAMS)
BUILT_SOURCES = $(MESA_UTIL_GENERATED_FILES)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
+ drirc \
format_srgb.py \
SConscript \
+ xmlpool.h \
sha1/README
PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources
index 8ea5f29533..3315285f05 100644
--- a/src/util/Makefile.sources
+++ b/src/util/Makefile.sources
@@ -56,3 +56,7 @@ MESA_UTIL_FILES := \
MESA_UTIL_GENERATED_FILES = \
format_srgb.c
+
+XMLCONFIG_FILES := \
+ xmlconfig.c \
+ xmlconfig.h
diff --git a/src/util/SConscript b/src/util/SConscript
index 7e447f6e03..582592c203 100644
--- a/src/util/SConscript
+++ b/src/util/SConscript
@@ -2,6 +2,10 @@ import common
Import('*')
+SConscript([
+ 'xmlpool',
+])
+
from sys import executable as python_cmd
env = env.Clone()
@@ -10,6 +14,7 @@ env.MSVC2013Compat()
env.Prepend(CPPPATH = [
'#include',
+ xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
'#src',
'#src/mapi',
'#src/mesa',
@@ -30,10 +35,17 @@ source_lists = env.ParseSourceList('Makefile.sources')
mesautil_sources = (
source_lists['MESA_UTIL_FILES'] +
- source_lists['MESA_UTIL_GENERATED_FILES']
+ source_lists['MESA_UTIL_GENERATED_FILES'] +
+ source_lists['XMLCONFIG_FILES']
)
-mesautil = env.ConvenienceLibrary(
+mesautilenv = env.Clone()
+
+mesautilenv.AppendUnique(LIBS = [
+ 'expat',
+])
+
+mesautil = mesautilenv.ConvenienceLibrary(
target = 'mesautil',
source = mesautil_sources,
)
diff --git a/src/mesa/drivers/dri/common/drirc b/src/util/drirc
index 69b735ce70..69b735ce70 100644
--- a/src/mesa/drivers/dri/common/drirc
+++ b/src/util/drirc
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/util/xmlconfig.c
index 9bd587b0e1..9bd587b0e1 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/util/xmlconfig.c
diff --git a/src/mesa/drivers/dri/common/xmlconfig.h b/src/util/xmlconfig.h
index 77aa14c20e..77aa14c20e 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.h
+++ b/src/util/xmlconfig.h
diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/util/xmlpool.h
index ebd4e7c863..ebd4e7c863 100644
--- a/src/mesa/drivers/dri/common/xmlpool.h
+++ b/src/util/xmlpool.h
diff --git a/src/mesa/drivers/dri/common/xmlpool/.gitignore b/src/util/xmlpool/.gitignore
index 383df727a1..383df727a1 100644
--- a/src/mesa/drivers/dri/common/xmlpool/.gitignore
+++ b/src/util/xmlpool/.gitignore
diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile.am b/src/util/xmlpool/Makefile.am
index dfd8fb8dc6..dfd8fb8dc6 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile.am
+++ b/src/util/xmlpool/Makefile.am
diff --git a/src/mesa/drivers/dri/common/xmlpool/SConscript b/src/util/xmlpool/SConscript
index fa42554d3a..fa42554d3a 100644
--- a/src/mesa/drivers/dri/common/xmlpool/SConscript
+++ b/src/util/xmlpool/SConscript
diff --git a/src/mesa/drivers/dri/common/xmlpool/ca.po b/src/util/xmlpool/ca.po
index 03bf29613f..03bf29613f 100644
--- a/src/mesa/drivers/dri/common/xmlpool/ca.po
+++ b/src/util/xmlpool/ca.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/de.po b/src/util/xmlpool/de.po
index 7b20d00a62..7b20d00a62 100644
--- a/src/mesa/drivers/dri/common/xmlpool/de.po
+++ b/src/util/xmlpool/de.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/es.po b/src/util/xmlpool/es.po
index f9d950ac14..f9d950ac14 100644
--- a/src/mesa/drivers/dri/common/xmlpool/es.po
+++ b/src/util/xmlpool/es.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/fr.po b/src/util/xmlpool/fr.po
index fa069652c2..fa069652c2 100644
--- a/src/mesa/drivers/dri/common/xmlpool/fr.po
+++ b/src/util/xmlpool/fr.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py b/src/util/xmlpool/gen_xmlpool.py
index eb68a65174..eb68a65174 100644
--- a/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py
+++ b/src/util/xmlpool/gen_xmlpool.py
diff --git a/src/mesa/drivers/dri/common/xmlpool/nl.po b/src/util/xmlpool/nl.po
index 86cb6e96d9..86cb6e96d9 100644
--- a/src/mesa/drivers/dri/common/xmlpool/nl.po
+++ b/src/util/xmlpool/nl.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/sv.po b/src/util/xmlpool/sv.po
index d8d7353f40..d8d7353f40 100644
--- a/src/mesa/drivers/dri/common/xmlpool/sv.po
+++ b/src/util/xmlpool/sv.po
diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/util/xmlpool/t_options.h
index 9aa1798b9d..9aa1798b9d 100644
--- a/src/mesa/drivers/dri/common/xmlpool/t_options.h
+++ b/src/util/xmlpool/t_options.h