build.bash   build.bash 
skipping to change at line 71 skipping to change at line 71
# The rest of the arguments are passed to configure. # The rest of the arguments are passed to configure.
buildit() buildit()
{ {
DESTDIR=$1 DESTDIR=$1
BUILD=$2 BUILD=$2
CFLAGS=$3 CFLAGS=$3
# Clean up if it was already configured. # Clean up if it was already configured.
[ -f Makefile ] && make distclean [ -f Makefile ] && make distclean
# Build the size-optimized binaries. Note that I don't want to # Build the size-optimized binaries. Providing size-optimized liblzm
# provide size-optimized liblzma (shared nor static), because a
# that isn't thread-safe now, and depending on bunch of things, # could be considered but I don't know if it should only use -Os or
# maybe it will never be on Windows (pthreads-win32 helps but # should it also use --enable-small and if it should support
# static liblzma might bit a bit tricky with it). # threading. So I don't include a size-optimized liblzma for now.
./configure \ ./configure \
--prefix= \ --prefix= \
--enable-silent-rules \
--disable-dependency-tracking \
--disable-nls \ --disable-nls \
--disable-scripts \ --disable-scripts \
--disable-threads \ --disable-threads \
--disable-shared \ --disable-shared \
--enable-small \ --enable-small \
--build="$BUILD" \ --build="$BUILD" \
CFLAGS="$CFLAGS -Os" CFLAGS="$CFLAGS -Os"
make check make check
mkdir -pv "$DESTDIR" mkdir -pv "$DESTDIR"
cp -v src/xzdec/{xz,lzma}dec.exe src/lzmainfo/lzmainfo.exe "$DESTDIR " cp -v src/xzdec/{xz,lzma}dec.exe src/lzmainfo/lzmainfo.exe "$DESTDIR "
make distclean make distclean
# Build the normal speed-optimized binaries. Note that while # Build the normal speed-optimized binaries. The type of threading
# --disable-threads has been documented to make some things # (win95 vs. vista) will be autodetect from the target architecture.
# thread-unsafe, it's not actually true with this combination
# of configure flags in XZ Utils 5.0.x. Things can (and probably
# will) change after 5.0.x, and this script will be updated too.
./configure \ ./configure \
--prefix= \ --prefix= \
--enable-silent-rules \
--disable-dependency-tracking \
--disable-nls \ --disable-nls \
--disable-scripts \ --disable-scripts \
--disable-threads \
--build="$BUILD" \ --build="$BUILD" \
CFLAGS="$CFLAGS -O2" CFLAGS="$CFLAGS -O2"
make -C src/liblzma make -C src/liblzma
make -C src/xz LDFLAGS=-static make -C src/xz LDFLAGS=-static
make -C tests check make -C tests check
cp -v src/xz/xz.exe src/liblzma/.libs/liblzma.a "$DESTDIR" cp -v src/xz/xz.exe src/liblzma/.libs/liblzma.a "$DESTDIR"
cp -v src/liblzma/.libs/liblzma-*.dll "$DESTDIR/liblzma.dll" cp -v src/liblzma/.libs/liblzma-*.dll "$DESTDIR/liblzma.dll"
strip -v "$DESTDIR/"*.{exe,dll} strip -v "$DESTDIR/"*.{exe,dll}
skipping to change at line 133 skipping to change at line 132
DESTDIR=$1 DESTDIR=$1
SUFFIX=$2 SUFFIX=$2
shift 2 shift 2
for SRCFILE; do for SRCFILE; do
DESTFILE="$DESTDIR/${SRCFILE##*/}$SUFFIX" DESTFILE="$DESTDIR/${SRCFILE##*/}$SUFFIX"
echo "Converting \`$SRCFILE' -> \`$DESTFILE'" echo "Converting \`$SRCFILE' -> \`$DESTFILE'"
u2d < "$SRCFILE" > "$DESTFILE" u2d < "$SRCFILE" > "$DESTFILE"
done done
} }
# FIXME: Make sure that we don't get i686 or i586 code from the runtime.
# Actually i586 would be fine, but i686 probably not if the idea is to
# support even Win95.
#
# FIXME: Using i486 in the configure triplet may be wrong.
if [ -d "$MINGW_W32_DIR" ]; then if [ -d "$MINGW_W32_DIR" ]; then
# 32-bit x86, Win95 or later, using MinGW-w32 # 32-bit x86, Win95 or later, using MinGW-w32
PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \ PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \
buildit \ buildit \
pkg/bin_i486 \ pkg/bin_i686 \
i486-w64-mingw32 \ i686-w64-mingw32 \
'-march=i486 -mtune=generic' '-march=i686 -mtune=generic'
# 32-bit x86 with SSE2, Win98 or later, using MinGW-w32
PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \
buildit \
pkg/bin_i686-sse2 \
i686-w64-mingw32 \
'-march=i686 -msse2 -mfpmath=sse -mtune=generic'
elif [ -d "$MINGW_DIR" ]; then elif [ -d "$MINGW_DIR" ]; then
# 32-bit x86, Win95 or later, using MinGW # 32-bit x86, Win95 or later, using MinGW
PATH=$MINGW_DIR/bin:$PATH \ PATH=$MINGW_DIR/bin:$PATH \
buildit \ buildit \
pkg/bin_i486 \ pkg/bin_i486 \
i486-pc-mingw32 \ i486-pc-mingw32 \
'-march=i486 -mtune=generic' '-march=i486 -mtune=generic'
fi fi
if [ -d "$MINGW_W64_DIR" ]; then if [ -d "$MINGW_W64_DIR" ]; then
# 64-bit x86, WinXP or later, using MinGW-w64 # x86-64, Windows Vista or later, using MinGW-w64
PATH=$MINGW_W64_DIR/bin:$MINGW_W64_DIR/x86_64-w64-mingw32/bin:$PATH \ PATH=$MINGW_W64_DIR/bin:$MINGW_W64_DIR/x86_64-w64-mingw32/bin:$PATH \
buildit \ buildit \
pkg/bin_x86-64 \ pkg/bin_x86-64 \
x86_64-w64-mingw32 \ x86_64-w64-mingw32 \
'-march=x86-64 -mtune=generic' '-march=x86-64 -mtune=generic'
fi fi
# Copy the headers, the .def file, and the docs. # Copy the headers, the .def file, and the docs.
# They are the same for all architectures and builds. # They are the same for all architectures and builds.
mkdir -pv pkg/{include/lzma,doc/{manuals,examples}} mkdir -pv pkg/{include/lzma,doc/{manuals,examples}}
 End of changes. 8 change blocks. 
20 lines changed or deleted 21 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/