This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Link dynamic tests with newly built glibc
On Wed, 10 Oct 2012, H.J. Lu wrote:
> diff --git a/catgets/Makefile b/catgets/Makefile
> index ec8fe1e..ad456c6 100644
> --- a/catgets/Makefile
> +++ b/catgets/Makefile
> @@ -58,15 +58,15 @@ tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
> $(objpfx)test1.cat: test1.msg $(objpfx)gencat
> LC_ALL=hr_HR.ISO-8859-2 LOCPATH=$(common-objpfx)localedata \
> GCONV_PATH=$(common-objpfx)iconvdata \
> - $(built-program-cmd) -H $(objpfx)test1.h $@ $<
> + $(test-program-cmd) -H $(objpfx)test1.h $@ $<
> $(objpfx)test2.cat: test2.msg $(objpfx)gencat
> LOCPATH=$(common-objpfx)localedata \
> GCONV_PATH=$(common-objpfx)iconvdata \
> - $(built-program-cmd) -H $(objpfx)test2.h $@ $<
> + $(test-program-cmd) -H $(objpfx)test2.h $@ $<
> $(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat
> $(make-target-directory)
> LC_ALL=de_DE.ISO-8859-1 LOCPATH=$(common-objpfx)localedata \
> - GCONV_PATH=$(common-objpfx)iconvdata $(built-program-cmd) $@ $<
> + GCONV_PATH=$(common-objpfx)iconvdata $(test-program-cmd) $@ $<
Here, $(built-program-cmd) is referring to gencat - a program built for
installation, that should be built with the installed name of the dynamic
linker rather than the name in the build directory. So I think
$(built-program-cmd) is correct in this case and should not be changed
here.
> $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
> GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
> - $(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@
> + $(test-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@
Likewise.
> diff --git a/localedata/Makefile b/localedata/Makefile
> index 5be2413..301f9b6 100644
> --- a/localedata/Makefile
> +++ b/localedata/Makefile
> @@ -133,7 +133,7 @@ generated-dirs += $(LOCALES)
> $(addprefix $(objpfx),$(CTYPE_FILES)): %: \
> gen-locale.sh $(common-objpfx)locale/localedef Makefile \
> $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
> - @$(SHELL) gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
> + @$(SHELL) gen-locale.sh $(common-objpfx) '$(test-program-cmd)' $@
Likewise, localedef is a program built for installation that still needs
$(built-program-cmd).
> $(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
> $(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
> - $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
> + $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@
Likewise.
> diff --git a/localedata/tst-fmon.sh b/localedata/tst-fmon.sh
> index 3e3dba9..dcd2a99 100755
> --- a/localedata/tst-fmon.sh
> +++ b/localedata/tst-fmon.sh
> @@ -21,7 +21,7 @@
> set -e
>
> common_objpfx=$1
> -run_program_prefix=$2
> +test_program_prefix=$2
> datafile=$3
>
> here=`pwd`
> @@ -34,7 +34,7 @@ for cns in `cd ./tst-fmon-locales && ls tstfmon_*`; do
> fn=charmaps/ISO-8859-1
> I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \
> LOCPATH=${common_objpfx}localedata LC_ALL=C LANGUAGE=C \
> - ${run_program_prefix} ${common_objpfx}locale/localedef \
> + ${test_program_prefix} ${common_objpfx}locale/localedef \
> --quiet -i $cn -f $fn ${common_objpfx}localedata/$cns
> done
Likewise, for running localedef this script still needs to receive and use
run_program_prefix. But ...
> @@ -47,7 +47,7 @@ while IFS=" " read locale format value expect; do
> expect=`echo "$expect" | sed 's/^\"\(.*\)\"$/\1/'`
> LOCPATH=${common_objpfx}localedata \
> GCONV_PATH=${common_objpfx}/iconvdata \
> - ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
> + ${test_program_prefix} ${common_objpfx}localedata/tst-fmon \
> "$locale" "$format" "$value" "$expect" ||
> errcode=$?
> fi
... it also needs to receive and use test_program_prefix, because it's
both running localedef (built for installation) and a test program (built
to run from the build tree).
> diff --git a/localedata/tst-trans.sh b/localedata/tst-trans.sh
> index e90b653..9aee0fa 100755
> --- a/localedata/tst-trans.sh
> +++ b/localedata/tst-trans.sh
> @@ -20,11 +20,11 @@
> set -e
>
> common_objpfx=$1
> -run_program_prefix=$2
> +test_program_prefix=$2
Similarly, this script needs both variables and needs to run localedef
with run_program_prefix.
> diff --git a/timezone/Makefile b/timezone/Makefile
> index 9e55a6a..80f7933 100644
> --- a/timezone/Makefile
> +++ b/timezone/Makefile
> @@ -71,7 +71,7 @@ CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT
> testdata = $(objpfx)testdata
> define build-testdata
> GCONV_PATH=${common-objpfx}iconvdata LANGUAGE=C LC_ALL=C \
> - $(built-program-cmd) -d $(testdata) -y ./yearistype $<
> + $(test-program-cmd) -d $(testdata) -y ./yearistype $<
> endef
>
> $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
> @@ -84,7 +84,7 @@ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
> test-tz-ENV = TZDIR=$(testdata)
> tst-timezone-ENV = TZDIR=$(testdata)
>
> -# Note this must come second in the deps list for $(built-program-cmd) to work.
> +# Note this must come second in the deps list for $(test-program-cmd) to work.
> zic-deps = $(objpfx)zic $(leapseconds) yearistype
zic is built for installation, so $(built-program-cmd) is still correct,
so neither of these changes should be there.
--
Joseph S. Myers
joseph@codesourcery.com