Skip to content

Commit

Permalink
ICU-20470 skip data/rules.mk regen for source tarball
Browse files Browse the repository at this point in the history
- If icu/source/data/locales/root.txt missing, skip
  python rules.mk generation.
- Also, create build directories properly as needed
- Also includes noise changes to configure
  (configure was probably generated using unreleased
   autoconf 2.70 or 2.69 + patches)
- eac8f4b did not
  regen configure properly, so BUILDTOOL_OPTS is now
  ICU_DATA_BUILDTOOL_OPTS
  • Loading branch information
srl295 committed Mar 4, 2019
1 parent 099ec53 commit 67d218f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 33 deletions.
40 changes: 17 additions & 23 deletions icu4c/source/configure
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -858,7 +857,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1111,15 +1109,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1257,7 +1246,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1410,7 +1399,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -9127,16 +9115,22 @@ if test -z "$PYTHON";
then
echo "" > data/rules.mk
else
echo "Spawning Python to generate data/rules.mk..."
PYTHONPATH="$srcdir/data" $PYTHON -m buildtool \
--mode gnumake \
--seqmode parallel \
--src_dir "$srcdir/data" \
--filter_file "$ICU_DATA_FILTER_FILE" \
$BUILDTOOL_OPTS \
> data/rules.mk
if test "$?" != "0"; then
as_fn_error $? "Python failed to run; see above error." "$LINENO" 5
if test -f "$srcdir/data/locales/root.txt";
then
echo "Spawning Python to generate data/rules.mk..."
PYTHONPATH="$srcdir/data" $PYTHON -m buildtool \
--mode gnumake \
--seqmode parallel \
--src_dir "$srcdir/data" \
--filter_file "$ICU_DATA_FILTER_FILE" \
$ICU_DATA_BUILDTOOL_OPTS \
> data/rules.mk
if test "$?" != "0"; then
as_fn_error $? "Python failed to run; see above error." "$LINENO" 5
fi
else
echo "Not rebuilding data/rules.mk, assuming prebuilt data in data/in"
touch data/rules.mk
fi
echo "Spawning Python to generate test/testdata/rules.mk..."
PYTHONPATH="$srcdir/test/testdata:$srcdir/data" $PYTHON -m buildtool \
Expand Down
26 changes: 16 additions & 10 deletions icu4c/source/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1391,16 +1391,22 @@ if test -z "$PYTHON";
then
echo "" > data/rules.mk
else
echo "Spawning Python to generate data/rules.mk..."
PYTHONPATH="$srcdir/data" $PYTHON -m buildtool \
--mode gnumake \
--seqmode parallel \
--src_dir "$srcdir/data" \
--filter_file "$ICU_DATA_FILTER_FILE" \
$ICU_DATA_BUILDTOOL_OPTS \
> data/rules.mk
if test "$?" != "0"; then
AC_MSG_ERROR(Python failed to run; see above error.)
if test -f "$srcdir/data/locales/root.txt";
then
echo "Spawning Python to generate data/rules.mk..."
PYTHONPATH="$srcdir/data" $PYTHON -m buildtool \
--mode gnumake \
--seqmode parallel \
--src_dir "$srcdir/data" \
--filter_file "$ICU_DATA_FILTER_FILE" \
$ICU_DATA_BUILDTOOL_OPTS \
> data/rules.mk
if test "$?" != "0"; then
AC_MSG_ERROR(Python failed to run; see above error.)
fi
else
echo "Not rebuilding data/rules.mk, assuming prebuilt data in data/in"
touch data/rules.mk
fi
echo "Spawning Python to generate test/testdata/rules.mk..."
PYTHONPATH="$srcdir/test/testdata:$srcdir/data" $PYTHON -m buildtool \
Expand Down
1 change: 1 addition & 0 deletions icu4c/source/data/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ build-local: $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST)
echo timestamp > $@
$(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE)
ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
$(MKINSTALLDIRS) $(OUTTMPDIR) $(BUILDDIR)
@echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)"
@-$(RMV) $@
$(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) -o $@
Expand Down

0 comments on commit 67d218f

Please sign in to comment.