summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-25 00:07:28 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-25 00:07:28 +0000
commite1ae525bd8de2232d091aafb055b48d13a7c03a9 (patch)
tree6c004ea2c393cecc0b8dfcb18e29d52ddbb093b6
parent92430836ea09f9b7278542b87426c8ceb0aa0864 (diff)
locales prepared for new build system, will allow to autobuild locales, not only use the pregenerated ones
-rw-r--r--Makefile.in8
-rw-r--r--extra/locale/Makefile97
-rw-r--r--extra/locale/gen_wc8bit.c2
-rw-r--r--extra/locale/gen_wctype.c2
4 files changed, 11 insertions, 98 deletions
diff --git a/Makefile.in b/Makefile.in
index 329443794..dfc3bd3fd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -107,7 +107,9 @@ ifeq ($(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA),y)
endif
ifeq ($(UCLIBC_PREGENERATED_LOCALE_DATA),y)
(cd $(top_builddir)extra/locale; zcat $(LOCALE_DATA_FILENAME) | tar -xvf -)
- $(MAKE) -C $(top_srcdir)extra/locale pregen
+endif
+ifeq ($(UCLIBC_HAS_LOCALE),y)
+ $(MAKE) -C $(top_builddir)extra/locale locale_objs
endif
install: install_runtime install_dev
@@ -335,8 +337,8 @@ clean:
distclean: clean
-find . \( -name core -o -name \*.orig -o -name \*~ \) -exec $(RM) {} \;
$(RM) .config .config.old .config.cmd
- $(RM) extra/locale/*.txt
- $(MAKE) -C extra clean
+ $(RM) extra/locale/*.{txt,tgz}
+ $(MAKE) -C extra/config clean
dist release:
$(MAKE) -s distclean
diff --git a/extra/locale/Makefile b/extra/locale/Makefile
index 031b8666f..11f362a5e 100644
--- a/extra/locale/Makefile
+++ b/extra/locale/Makefile
@@ -5,98 +5,9 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+top_srcdir=../../
top_builddir=../../
+all: objs
include $(top_builddir)Rules.mak
-
-EXTRA_LOCALE_DIR:=${shell cd $(top_builddir)extra/locale && pwd}
-
-CFLAGS_wc8bit=-DCTYPE_PACKED=1
-CFLAGS_mmap=
-ifeq ($(UCLIBC_HAS_WCHAR),y)
- CFLAGS_wc8bit += -DDO_WIDE_CHAR=1
- CFLAGS_mmap += -D__WCHAR_ENABLED=1
-endif
-
-all: links-target
-
-codesets.txt:
- @if [ ! -f codesets.txt ] ; then \
- set -e; \
- echo " "; \
- echo "You do not have a codesets.txt file. Please create this "; \
- echo "file in the extra/locale directory by running something like: "; \
- echo -e " find $(EXTRA_LOCALE_DIR)/charmaps -name \"*.pairs\" > \\"; \
- echo -e " $(EXTRA_LOCALE_DIR)/codesets.txt"; \
- echo "and then edit that file to disable/enable the codesets you wish to support. "; \
- echo " "; \
- false; \
- fi;
-
-gen_wc8bit: gen_wc8bit.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $(CFLAGS_wc8bit) -D__UCLIBC_GEN_LOCALE $^ -o $@
-
-c8tables.h: gen_wc8bit codesets.txt
- ./gen_wc8bit `cat codesets.txt`
-
-gen_wctype: gen_wctype.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) -D__UCLIBC_GEN_LOCALE $^ -o $@
-
-# Warning! Beware tr_TR toupper/tolower exceptions!
-wctables.h: gen_wctype
- ./gen_wctype en_US
-
-gen_locale: gen_locale.c c8tables.h
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) gen_locale.c -o $@
-
-locale_tables.h: gen_locale locales.txt
- ./gen_locale locales.txt
-
-lt_defines.h: locale_tables.h locale_collate.h
- grep "^#define" locale_tables.h > lt_defines.h
- grep "^#define __lc" locale_collate.h >> lt_defines.h
-
-gen_collate: gen_collate.c
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) gen_collate.c -o $@
-
-locale_collate.h: gen_collate locale_tables.h
- grep COL_IDX_ locale_tables.h | sed -e "s/^.*COL_IDX_\([^, ]*\).*$$/\1/" | sort | uniq | xargs ./gen_collate
-
-locales.txt:
- @if [ ! -f locales.txt ] ; then \
- set -e; \
- echo " "; \
- echo "You do not have a locales.txt file in the extra/locale "; \
- echo "directory, Please copy the LOCALES file to locales.txt by "; \
- echo "running something like: "; \
- echo " cp $(EXTRA_LOCALE_DIR)/LOCALES \\ "; \
- echo " $(EXTRA_LOCALE_DIR)/locales.txt "; \
- echo "then edit locales.txt to disable/enable the locales you wish "; \
- echo "to support. "; \
- echo " "; \
- false; \
- fi;
-
-gen_ldc: gen_ldc.c c8tables.h wctables.h locale_tables.h locale_collate.h
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $(CFLAGS_mmap) gen_ldc.c -o $@
-
-locale_data.c: gen_ldc
- ./gen_ldc
-
-uClibc_locale_data.h: c8tables.h wctables.h lt_defines.h locale_mmap.h
- grep -v "define __LC" lt_defines.h > uClibc_locale_data.h
- cat c8tables.h wctables.h locale_mmap.h >> uClibc_locale_data.h
-
-links-target: locale_data.c uClibc_locale_data.h
- cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
-
-pregen:
- cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
-
-clean:
- $(RM) *.o *~ core
- $(RM) gen_wc8bit gen_wctype gen_locale gen_ldc gen_collate
- $(RM) c8tables.h wctables.h locale_tables.h lt_defines.h locale_collate.h
- $(RM) gen_mmap locale.mmap lmmtolso
- $(RM) locale_data.c uClibc_locale_data.h
-
-.PHONY: pregen links-target
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/extra/locale/gen_wc8bit.c b/extra/locale/gen_wc8bit.c
index 8a6d47a11..510b4e25f 100644
--- a/extra/locale/gen_wc8bit.c
+++ b/extra/locale/gen_wc8bit.c
@@ -13,7 +13,7 @@
#ifndef _WCTYPE_H
#define _WCTYPE_H
#endif
-#include "../../libc/sysdeps/linux/common/bits/uClibc_ctype.h"
+#include <bits/uClibc_ctype.h>
/* #define CTYPE_PACKED */
diff --git a/extra/locale/gen_wctype.c b/extra/locale/gen_wctype.c
index e0df4e88c..72be49c40 100644
--- a/extra/locale/gen_wctype.c
+++ b/extra/locale/gen_wctype.c
@@ -20,7 +20,7 @@
#ifndef _WCTYPE_H
#define _WCTYPE_H
#endif
-#include "../../libc/sysdeps/linux/common/bits/uClibc_ctype.h"
+#include <bits/uClibc_ctype.h>
/* 0x9 : space blank */
/* 0xa : space */