diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-08-17 19:17:00 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-08-17 19:17:00 +0200 |
commit | 49d8a0e9c6e32701c7eca91a1204237d3a334e38 (patch) | |
tree | 500e0c09a66970494dffbfe3a36f958762d22f99 /extra/locale/Makefile.in | |
parent | 7f779e7937cca133ea5f2d18c154c6564516fd9f (diff) |
support building out-of-tree
Handle O=
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/locale/Makefile.in')
-rw-r--r-- | extra/locale/Makefile.in | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/extra/locale/Makefile.in b/extra/locale/Makefile.in index 66e14fba9..dd62071ba 100644 --- a/extra/locale/Makefile.in +++ b/extra/locale/Makefile.in @@ -19,7 +19,7 @@ BUILD_CFLAGS-locale-common := \ BUILD_CFLAGS-gen_wc8bit := $(BUILD_CFLAGS-locale-common) -DCTYPE_PACKED=1 BUILD_CFLAGS-gen_wctype := $(BUILD_CFLAGS-locale-common) -BUILD_CFLAGS-gen_ldc := +BUILD_CFLAGS-gen_ldc := -I$(locale_OUT) ifeq ($(UCLIBC_HAS_WCHAR),y) BUILD_CFLAGS-gen_wc8bit += -DDO_WIDE_CHAR=1 BUILD_CFLAGS-gen_ldc += -D__WCHAR_ENABLED=1 @@ -34,11 +34,12 @@ DEPH-locale := $(top_builddir)include/bits/uClibc_config.h DEPH-gen_collate := $(DEPH-locale) DEPH-gen_ldc := $(addprefix $(locale_OUT)/,c8tables.h wctables.h locale_tables.h locale_collate.h) $(DEPH-locale) DEPH-gen_locale := $(addprefix $(locale_OUT)/,c8tables.h) $(DEPH-locale) -DEPH-gen_wc8bit := $(top_builddir)/include/bits/uClibc_ctype.h $(DEPH-locale) -DEPH-gen_wctype := $(top_builddir)/include/bits/uClibc_ctype.h $(DEPH-locale) +DEPH-gen_wc8bit := $(top_builddir)include/bits/uClibc_ctype.h $(DEPH-locale) +DEPH-gen_wctype := $(top_builddir)include/bits/uClibc_ctype.h $(DEPH-locale) locale_HOBJ := gen_collate gen_ldc gen_locale gen_wc8bit gen_wctype locale_HOBJ := $(addprefix $(locale_OUT)/,$(locale_HOBJ)) +$(locale_HOBJ): | $(locale_OUT) locale_SRC := $(locale_OUT)/locale_data.c locale_OBJ := $(locale_OUT)/locale_data.o @@ -49,9 +50,24 @@ CFLAGS-locale_data.c := -D__WCHAR_ENABLED -I$(locale_OUT) -I$(locale_DIR) headers: $(locale_headers-y) libc-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ) - libc-nomulti-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ) +$(locale_OUT)%.o: $(locale_OUT)%.c FORCE ; $(compile.c) +$(locale_OUT)%.os: $(locale_OUT)%.c FORCE ; $(compile.c) +$(locale_OUT)%.oS: $(locale_OUT)%.c FORCE ; $(compile.c) +$(locale_OUT)%.o: $(locale_OUT)%.S FORCE ; $(compile.S) +$(locale_OUT)%.os: $(locale_OUT)%.S FORCE ; $(compile.S) +$(locale_OUT)%.oS: $(locale_OUT)%.S FORCE ; $(compile.S) +$(locale_OUT)%.o: $(locale_OUT)%.s FORCE ; $(compile.S) +$(locale_OUT)%.os: $(locale_OUT)%.s FORCE ; $(compile.S) +$(locale_OUT)%.oS: $(locale_OUT)%.s FORCE ; $(compile.S) +$(locale_OUT)%.i: $(locale_OUT)%.c FORCE ; $(compile.i) +$(locale_OUT)%.i: $(locale_OUT)%.S FORCE ; $(compile.i) +$(locale_OUT)%.s: $(locale_OUT)%.c FORCE ; $(compile.s) +$(locale_OUT)%.s: $(locale_OUT)%.S FORCE ; $(compile.s) +$(locale_OUT)%.dep: + + locale_headers: headers $(top_builddir)include/bits/uClibc_locale_data.h # make sure that the host system has locales (this check is ok for uClibc/glibc) @@ -64,7 +80,7 @@ $(locale_OUT)/codesets.txt: echo " "; \ echo "You do not have a codesets.txt file. Please create this "; \ echo "file in the $(locale_OUT) directory by running something like: "; \ - echo " cd $(locale_DIR)/ && find charmaps -name \"*.pairs\" > \\"; \ + echo " find $(PWD)/$(locale_DIR)/charmaps -name \"*.pairs\" > \\"; \ echo " $@"; \ echo "and then edit that file to disable/enable the codesets you wish to support. "; \ echo " "; \ @@ -91,10 +107,19 @@ else $(locale_OUT)/codesets.txt: @$(disp_gen) ifeq ($(UCLIBC_BUILD_MINIMAL_LOCALE),y) - $(Q)echo "charmaps/ASCII.pairs" > $@ ; \ - $(Q)echo "charmaps/ISO-8859-1.pairs" >> $@ + $(Q)echo "$(PWD)/$(locale_DIR)/charmaps/ASCII.pairs" > $@ ; \ + $(Q)echo "$(PWD)/$(locale_DIR)/charmaps/ISO-8859-1.pairs" >> $@ else - $(Q)(cd $(locale_DIR)/ && find charmaps/ -name '*.pairs' | sort ) > $@ + $(Q)set -e; \ + tmp=`mktemp $@.XXXXXX 2>/dev/null || true`; \ + [ -z "$$tmp" ] && tmp='$@.new'; \ + find $(PWD)/$(locale_DIR)/charmaps/ -name '*.pairs' | \ + sort > $$tmp; \ + if cmp $@ $$tmp >/dev/null 2>&1; then \ + $(RM) $$tmp; \ + else \ + mv -f $$tmp $@; \ + fi endif # the lines beginning w/ '#-' are mandatory @@ -144,18 +169,16 @@ endif # grep fopen *.c $(locale_OUT)/c8tables.h: $(locale_OUT)/gen_wc8bit $(locale_OUT)/codesets.txt @$(disp_gen) - $(Q)(cd $(<D) && ./$(<F) `cat $(word 2,$(^F))`) + $(Q)$< `cat $(word 2,$^)` > $@ # Warning! Beware tr_TR toupper/tolower exceptions! $(locale_OUT)/wctables.h: $(locale_OUT)/gen_wctype @$(disp_gen) - $(Q)(cd $(<D) || exit 1 ; \ - ./$(<F) $(FLAG-locale-verbose) en_US || \ - ./$(<F) $(FLAG-locale-verbose) en_US.UTF-8 || \ - ./$(<F) $(FLAG-locale-verbose) en_US.iso8859-1 || \ - ./$(<F) $(FLAG-locale-verbose) en_GB || \ - ./$(<F) $(FLAG-locale-verbose) en_GB.UTF-8 \ - ) + $(Q)$< $(FLAG-locale-verbose) en_US > $@ || \ + $< $(FLAG-locale-verbose) en_US.UTF-8 > $@ || \ + $< $(FLAG-locale-verbose) en_US.iso8859-1 > $@ || \ + $< $(FLAG-locale-verbose) en_GB > $@ || \ + $< $(FLAG-locale-verbose) en_GB.UTF-8 > $@ $(locale_OUT)/locale_tables.h: $(locale_OUT)/gen_locale $(locale_OUT)/locales.txt @$(disp_gen) @@ -174,13 +197,13 @@ $(locale_OUT)/locale_collate.h: $(locale_OUT)/gen_collate $(locale_OUT)/locale_t $(locale_OUT)/$(LOCALE_DATA_FILENAME): ifeq ($(UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA),y) - ( cd $(dir $@); $(WGET) http://www.uclibc.org/downloads/$(notdir $@) ) + ( cd $(@D); $(WGET) http://www.uclibc.org/downloads/$(@F) ) endif ifeq ($(UCLIBC_PREGENERATED_LOCALE_DATA),y) $(locale_SRC): $(locale_OUT)/$(LOCALE_DATA_FILENAME) - zcat $< | $(TAR) -xv -C $(dir $@) -f - + zcat $< | $(TAR) -xv -C $(@D) -f - touch $@ # we use the one in locale_DIR #$(RM) $(locale_OUT)/locale_mmap.h |