]> granicus.if.org Git - xz/commitdiff
Renamed lzma to xz and lzmadec to xzdec. We create symlinks
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 19 Nov 2008 21:52:24 +0000 (23:52 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 19 Nov 2008 21:52:24 +0000 (23:52 +0200)
lzma, unlzma, and lzcat in "make install" for backwards
compatibility with LZMA Utils 4.32.x; I'm not sure if this
should be the default though.

28 files changed:
configure.ac
po/POTFILES.in
src/Makefile.am
src/xz/Makefile.am [moved from src/lzma/Makefile.am with 69% similarity]
src/xz/args.c [moved from src/lzma/args.c with 100% similarity]
src/xz/args.h [moved from src/lzma/args.h with 100% similarity]
src/xz/hardware.c [moved from src/lzma/hardware.c with 100% similarity]
src/xz/hardware.h [moved from src/lzma/hardware.h with 100% similarity]
src/xz/io.c [moved from src/lzma/io.c with 100% similarity]
src/xz/io.h [moved from src/lzma/io.h with 100% similarity]
src/xz/list.c [moved from src/lzma/list.c with 100% similarity]
src/xz/main.c [moved from src/lzma/main.c with 100% similarity]
src/xz/main.h [moved from src/lzma/main.h with 100% similarity]
src/xz/message.c [moved from src/lzma/message.c with 100% similarity]
src/xz/message.h [moved from src/lzma/message.h with 100% similarity]
src/xz/options.c [moved from src/lzma/options.c with 100% similarity]
src/xz/options.h [moved from src/lzma/options.h with 100% similarity]
src/xz/private.h [moved from src/lzma/private.h with 100% similarity]
src/xz/process.c [moved from src/lzma/process.c with 100% similarity]
src/xz/process.h [moved from src/lzma/process.h with 100% similarity]
src/xz/suffix.c [moved from src/lzma/suffix.c with 100% similarity]
src/xz/suffix.h [moved from src/lzma/suffix.h with 100% similarity]
src/xz/util.c [moved from src/lzma/util.c with 100% similarity]
src/xz/util.h [moved from src/lzma/util.h with 100% similarity]
src/xzdec/Makefile.am [moved from src/lzmadec/Makefile.am with 81% similarity]
src/xzdec/xzdec.c [moved from src/lzmadec/lzmadec.c with 99% similarity]
tests/test_compress.sh
tests/test_files.sh

index 8f6340c4c141e29f62ad1c1d5e4a31c90076eced..beef9df364e3a4b6b6590a9a35c3c6b79c2d3a11 100644 (file)
@@ -709,8 +709,8 @@ AC_CONFIG_FILES([
        src/liblzma/subblock/Makefile
        src/liblzma/delta/Makefile
        src/liblzma/simple/Makefile
-       src/lzma/Makefile
-       src/lzmadec/Makefile
+       src/xz/Makefile
+       src/xzdec/Makefile
        src/scripts/Makefile
        tests/Makefile
        debug/Makefile
index 72f744a99dd8cfc25cd5aefb04650bf3c881ef76..4d1299a33448b504a160b5a1acb544c13e788ccc 100644 (file)
@@ -1,13 +1,10 @@
 # List of source files which contain translatable strings.
-src/lzma/help.c
-src/lzma/alloc.c
-src/lzma/args.c
-src/lzma/error.c
-src/lzma/io.c
-src/lzma/list.c
-src/lzma/main.c
-src/lzma/options.c
-src/lzma/process.c
-src/lzma/suffix.c
-src/lzma/util.c
-lib/getopt.c
+src/xz/args.c
+src/xz/hardware.c
+src/xz/io.c
+src/xz/main.c
+src/xz/message.c
+src/xz/options.c
+src/xz/process.c
+src/xz/suffix.c
+src/xz/util.c
index 531496c25965e6c6e29cf21021f31e74b795464c..26e0588d3721cf1dae8a8b38479c807795d62988 100644 (file)
@@ -12,5 +12,5 @@
 ##  Lesser General Public License for more details.
 ##
 
-SUBDIRS = liblzma lzma lzmadec scripts
+SUBDIRS = liblzma xz xzdec scripts
 EXTRA_DIST = common
similarity index 69%
rename from src/lzma/Makefile.am
rename to src/xz/Makefile.am
index e5c5c29a7d6214ed71e5b10f0b516a7ce43164f5..16e55461079d826cdad769a951d918aa3bfcf5bb 100644 (file)
@@ -12,9 +12,9 @@
 ##  Lesser General Public License for more details.
 ##
 
-bin_PROGRAMS = lzma
+bin_PROGRAMS = xz
 
-lzma_SOURCES = \
+xz_SOURCES = \
        args.c \
        args.h \
        hardware.c \
@@ -35,38 +35,40 @@ lzma_SOURCES = \
        util.c \
        util.h
 
-## It must be able to find sysdefs.h, lzma_adv.h, and possible
-## replacement headers.
-lzma_CPPFLAGS = \
+xz_CPPFLAGS = \
        -DLOCALEDIR=\"$(localedir)\" \
        -I@top_srcdir@/src/common \
        -I@top_srcdir@/src/liblzma/api \
        -I@top_builddir@/lib \
        -I@top_srcdir@/lib
 
-lzma_CFLAGS = @PTHREAD_CFLAGS@
+xz_CFLAGS = @PTHREAD_CFLAGS@
 
 ## Always link the command line tool statically against liblzma. It is
 ## faster on x86, because no need for PIC. We also have one dependency less,
-## which allows users to more freely copy the lzma binary to other boxes.
-lzma_LDFLAGS = -static
-lzma_LDADD = \
+## which allows users to more freely copy the xz binary to other boxes.
+xz_LDFLAGS = -static
+xz_LDADD = \
        @top_builddir@/src/liblzma/liblzma.la \
        @LTLIBINTL@ \
        @PTHREAD_LIBS@
 
 if COND_GNULIB
-lzma_LDADD += @top_builddir@/lib/libgnu.a
+xz_LDADD += @top_builddir@/lib/libgnu.a
 endif
 
 
-## Create symlinks for unlzma and lzcat:
+## Create symlinks for unxz and xzcat for convenicen. Create symlinks also
+## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
 install-exec-hook:
        cd $(DESTDIR)$(bindir) && \
-       rm -f unlzma lzcat && \
-       $(LN_S) lzma unlzma && \
-       $(LN_S) lzma lzcat
+       rm -f unxz xzcat lzma unlzma lzcat && \
+       $(LN_S) xz unxz && \
+       $(LN_S) xz xzcat && \
+       $(LN_S) xz lzma && \
+       $(LN_S) xz unlzma && \
+       $(LN_S) xz lzcat
 
 uninstall-hook:
        cd $(DESTDIR)$(bindir) && \
-       rm -f unlzma lzcat
+       rm -f unxz xzcat lzma unlzma lzcat
similarity index 100%
rename from src/lzma/args.c
rename to src/xz/args.c
similarity index 100%
rename from src/lzma/args.h
rename to src/xz/args.h
similarity index 100%
rename from src/lzma/hardware.c
rename to src/xz/hardware.c
similarity index 100%
rename from src/lzma/hardware.h
rename to src/xz/hardware.h
similarity index 100%
rename from src/lzma/io.c
rename to src/xz/io.c
similarity index 100%
rename from src/lzma/io.h
rename to src/xz/io.h
similarity index 100%
rename from src/lzma/list.c
rename to src/xz/list.c
similarity index 100%
rename from src/lzma/main.c
rename to src/xz/main.c
similarity index 100%
rename from src/lzma/main.h
rename to src/xz/main.h
similarity index 100%
rename from src/lzma/message.c
rename to src/xz/message.c
similarity index 100%
rename from src/lzma/message.h
rename to src/xz/message.h
similarity index 100%
rename from src/lzma/options.c
rename to src/xz/options.c
similarity index 100%
rename from src/lzma/options.h
rename to src/xz/options.h
similarity index 100%
rename from src/lzma/private.h
rename to src/xz/private.h
similarity index 100%
rename from src/lzma/process.c
rename to src/xz/process.c
similarity index 100%
rename from src/lzma/process.h
rename to src/xz/process.h
similarity index 100%
rename from src/lzma/suffix.c
rename to src/xz/suffix.c
similarity index 100%
rename from src/lzma/suffix.h
rename to src/xz/suffix.h
similarity index 100%
rename from src/lzma/util.c
rename to src/xz/util.c
similarity index 100%
rename from src/lzma/util.h
rename to src/xz/util.h
similarity index 81%
rename from src/lzmadec/Makefile.am
rename to src/xzdec/Makefile.am
index 650eb1c4f5c367e09fc3542e6356f90cb4c8246a..8c8cae809f408f74b5c1217494071b83baf32100 100644 (file)
 ##  Lesser General Public License for more details.
 ##
 
-bin_PROGRAMS = lzmadec
+bin_PROGRAMS = xzdec
 
-lzmadec_SOURCES = lzmadec.c
-lzmadec_CPPFLAGS = \
+xzdec_SOURCES = xzdec.c
+xzdec_CPPFLAGS = \
        -I@top_srcdir@/src/common \
        -I@top_srcdir@/src/liblzma/api \
        -I@top_builddir@/lib
-lzmadec_LDFLAGS = -static
-lzmadec_LDADD = \
+xzdec_LDFLAGS = -static
+xzdec_LDADD = \
        @top_builddir@/src/liblzma/liblzma.la \
        @LTLIBINTL@
 
 if COND_GNULIB
-lzmadec_LDADD += @top_builddir@/lib/libgnu.a
+xzdec_LDADD += @top_builddir@/lib/libgnu.a
 endif
similarity index 99%
rename from src/lzmadec/lzmadec.c
rename to src/xzdec/xzdec.c
index 0b2adb9744ecc6e98f717f95fea1f197e7e5860a..e100d04956b2fd7d1c3fdb76cb019080fff822e1 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-/// \file       lzmadec.c
+/// \file       xzdec.c
 /// \brief      Simple single-threaded tool to uncompress .lzma files
 //
 //  Copyright (C) 2007 Lasse Collin
@@ -151,7 +151,7 @@ set_default_memlimit(void)
 
 /// \brief      Converts a string to size_t
 ///
-/// This is rudely copied from src/lzma/util.c and modified a little. :-(
+/// This is rudely copied from src/xz/util.c and modified a little. :-(
 ///
 static size_t
 str_to_uint64(const char *value)
index 667d8fda6d1b646b0243711fd735b16ccafcd1a2..c02504f2fe4d545ee280b111e718d10917ec3c2b 100755 (executable)
@@ -24,8 +24,8 @@ if test $? != 42 ; then
        exit 77
 fi
 
-test_lzma() {
-       if $LZMA -c "$@" "$FILE" > tmp_compressed; then
+test_xz() {
+       if $XZ -c "$@" "$FILE" > tmp_compressed; then
                :
        else
                echo "Compressing failed: $* $FILE"
@@ -33,7 +33,7 @@ test_lzma() {
                exit 1
        fi
 
-       if $LZMA -cd tmp_compressed > tmp_uncompressed ; then
+       if $XZ -cd tmp_compressed > tmp_uncompressed ; then
                :
        else
                echo "Decoding failed: $* $FILE"
@@ -49,7 +49,7 @@ test_lzma() {
                exit 1
        fi
 
-       if $LZMADEC tmp_compressed > tmp_uncompressed ; then
+       if $XZDEC tmp_compressed > tmp_uncompressed ; then
                :
        else
                echo "Decoding failed: $* $FILE"
@@ -69,10 +69,9 @@ test_lzma() {
        echo . | tr -d '\n\r'
 }
 
-# TODO: Remove --format=xz once the command name has been changed.
-LZMA="../src/lzma/lzma --memory=15Mi --threads=1 --format=xz"
-LZMADEC="../src/lzmadec/lzmadec --memory=4Mi"
-unset LZMA_OPT
+XZ="../src/xz/xz --memory=15MiB --threads=1"
+XZDEC="../src/xzdec/xzdec --memory=4MiB"
+unset XZ_OPT
 
 # Create the required input files.
 if ./create_compress_files ; then
@@ -97,11 +96,11 @@ do
        echo "  $MSG" | tr -d '\n\r'
 
        # Don't test with empty arguments; it breaks some ancient
-       # proprietary /bin/sh versions due to $@ used in test_lzma().
-       test_lzma -1
-       test_lzma -2
-       test_lzma -3
-       test_lzma -4
+       # proprietary /bin/sh versions due to $@ used in test_xz().
+       test_xz -1
+       test_xz -2
+       test_xz -3
+       test_xz -4
 
        for ARGS in \
                --subblock \
@@ -122,8 +121,8 @@ do
                --armthumb \
                --sparc
        do
-               test_lzma $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
-               test_lzma --subblock $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
+               test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
+               test_xz --subblock $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
        done
 
        echo
index c670d728bdbf14efc84aec95abd75e3a68661479..b40a57a5273ec7ed1bfaa972066f111ba52fe951 100755 (executable)
@@ -18,7 +18,7 @@
 
 for I in "$srcdir"/files/good-*.xz
 do
-       if ../src/lzmadec/lzmadec "$I" > /dev/null 2> /dev/null ; then
+       if ../src/xzdec/xzdec "$I" > /dev/null 2> /dev/null ; then
                :
        else
                echo "Good file failed: $I"
@@ -29,7 +29,7 @@ done
 
 for I in "$srcdir"/files/bad-*.xz
 do
-       if ../src/lzmadec/lzmadec "$I" > /dev/null 2> /dev/null ; then
+       if ../src/xzdec/xzdec "$I" > /dev/null 2> /dev/null ; then
                echo "Bad file succeeded: $I"
                (exit 1)
                exit 1