Skip to content

Commit

Permalink
[mono] Move some culture-dependent source files to a separate directo…
Browse files Browse the repository at this point in the history
…ry (mono#19912)

* [mono] Move culture-info-tables.h to a separate directory

We'd like to remove culture-info-tables.h from the dotnet/runtime copy of mono since we use ICU
there for globalization like the rest of .NET 5.

The plan is:
1. We move the file (and some others) to a separate directory (this PR)
2. We tell the sync bot to skip `culture/` in the future
3. We delete the files (or make them empty) in dotnet/runtime
* Also move locale.c and culture-info.h

* Also move mono_w32process_ver_language_name

* [msvc] don't compile locales.c if it doesn't exist

   It exists for now, but won't after we stop syncing culture/ to dotnet/runtime
  • Loading branch information
lambdageek authored Jun 6, 2020
1 parent ad0b2b8 commit ba14e69
Show file tree
Hide file tree
Showing 12 changed files with 854 additions and 799 deletions.
1 change: 1 addition & 0 deletions m4/mono-output.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ AC_DEFUN([AC_MONO_OUTPUT], [
llvm/Makefile
mono/Makefile
mono/btls/Makefile
mono/culture/Makefile
mono/native/Makefile
mono/utils/Makefile
mono/metadata/Makefile
Expand Down
10 changes: 6 additions & 4 deletions mono/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ if ENABLE_NETCORE
btls_dirs =
managed_unit_test_dirs =
native_unit_test_dirs =
culture_dirs =
else
managed_unit_test_dirs = tests
native_unit_test_dirs = unit-tests
culture_dirs = culture
endif

if ENABLE_PERFTRACING
Expand All @@ -30,14 +32,14 @@ SUBDIRS = eglib arch utils sgen zlib $(eventpipe_dirs) metadata mini profiler $(
else

if CROSS_COMPILING
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis profiler $(native_dirs)
else
if INSTALL_MONOTOUCH
SUBDIRS = $(btls_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs)
else
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler $(native_dirs)
endif
endif
endif

DIST_SUBDIRS = btls native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler
DIST_SUBDIRS = btls $(culture_dirs) native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler
12 changes: 12 additions & 0 deletions mono/culture/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/Makefile
/Makefile.in
/.libs
/.deps
/*.lo
/*.la
/*.o
/*.a
/semantic.cache
/.project
/.cproject
/TAGS
24 changes: 24 additions & 0 deletions mono/culture/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(GLIB_CFLAGS) $(SHARED_CFLAGS)

CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)

if !ENABLE_MSVC_ONLY

noinst_LTLIBRARIES = libmono-culture.la

if !HOST_WIN32
unix_sources = w32process-unix-language.c

platform_sources = $(unix_sources)
endif

libmono_culture_la_SOURCES = \
$(platform_sources) \
culture-info.h \
culture-info-tables.h \
locales.c
libmono_culture_la_CPPFLAGS = $(AM_CPPFLAGS) @CXX_ADD_CFLAGS@

endif # ENABLE_MSVC_ONLY
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions mono/metadata/locales.c → mono/culture/locales.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include <mono/metadata/exception.h>
#include <mono/metadata/monitor.h>
#include <mono/metadata/locales.h>
#include <mono/metadata/culture-info.h>
#include <mono/metadata/culture-info-tables.h>
#include <mono/culture/culture-info.h>
#include <mono/culture/culture-info-tables.h>
#include <mono/utils/bsearch.h>

#ifndef DISABLE_NORMALIZATION
Expand All @@ -40,7 +40,7 @@
#if defined(__APPLE__)
#include <CoreFoundation/CoreFoundation.h>
#endif
#include "icall-decl.h"
#include <mono/metadata/icall-decl.h>

#undef DEBUG

Expand Down
Loading

0 comments on commit ba14e69

Please sign in to comment.