diff options
author | Bruno Haible <bruno@clisp.org> | 2010-06-07 02:44:45 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-08-30 22:58:23 +0200 |
commit | 84a360eeff3d7af217ef56603db1e5a86e3d68d7 (patch) | |
tree | a0337e0fceaa8788e6f68f0ecf6c7eed4d71a1a6 /gettext-tools/misc | |
parent | 99d1fc2e607d67e00175bc5b8020c8af5bbea7b2 (diff) | |
download | external_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.zip external_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.tar.gz external_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.tar.bz2 |
New options --with-xz and --with-bzip2 for compressing the archive.
Diffstat (limited to 'gettext-tools/misc')
-rw-r--r-- | gettext-tools/misc/ChangeLog | 21 | ||||
-rw-r--r-- | gettext-tools/misc/Makefile.am | 86 | ||||
-rwxr-xr-x | gettext-tools/misc/add-to-archive | 6 | ||||
-rw-r--r-- | gettext-tools/misc/autopoint.in | 13 | ||||
-rw-r--r-- | gettext-tools/misc/convert-archive.in | 25 |
5 files changed, 120 insertions, 31 deletions
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index a805edc..1aeaeb3 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,5 +1,26 @@ 2010-06-06 Bruno Haible <bruno@clisp.org> + New options --with-xz and --with-bzip2 for compressing the archive. + * autopoint.in: Handle the archive formats dirgz, dirbz2, dirxz instead + of dir. + * convert-archive.in: Handle the archive formats dirgz, dirbz2, dirxz + like dir. Format 'dir' is now without compression. + * Makefile.am (MOSTLYCLEANFILES): New variable. + (CLEANFILES): Add archive.dir.tar.gz, archive.dir.tar.bz2, + archive.dir.tar.xz. + (EXTRA_DIST): Add archive.dir.tar. Remove archive.dir.tar.gz. + (ARCHIVE_dirgz, ARCHIVE_dirbz2, ARCHIVE_dirxz, ARCHIVE_git, + ARCHIVE_cvs): New variables. + (gettextsrc_DATA): Use them. + (archive.dir.tar): Renamed from archive.dir.tar.gz. Look for an + installed .tar.bzip2 or .tar.xz as well. + (archive.dir.tar.gz, archive.dir.tar.bz2, archive.dir.tar.xz): New + rules. + (archive.git.tar.gz, archive.cvs.tar.gz): Update. + * add-to-archive: Read and write an uncompressed archive.dir.tar. + +2010-06-06 Bruno Haible <bruno@clisp.org> + Make 'convert-archive' less verbose. * convert-archive.in: Avoid all output from "git commit". diff --git a/gettext-tools/misc/Makefile.am b/gettext-tools/misc/Makefile.am index 4147e18..1c30157 100644 --- a/gettext-tools/misc/Makefile.am +++ b/gettext-tools/misc/Makefile.am @@ -18,6 +18,7 @@ AUTOMAKE_OPTIONS = 1.2 gnits EXTRA_DIST = +MOSTLYCLEANFILES = CLEANFILES = DISTCLEANFILES = @@ -28,38 +29,87 @@ bin_SCRIPTS = gettextize autopoint DISTCLEANFILES += gettextize autopoint convert-archive -CLEANFILES += archive.cvs.tar.gz archive.git.tar.gz +CLEANFILES += \ + archive.dir.tar.gz \ + archive.dir.tar.bz2 \ + archive.dir.tar.xz \ + archive.cvs.tar.gz \ + archive.git.tar.gz -EXTRA_DIST += add-to-archive cvsuser.c archive.dir.tar.gz +EXTRA_DIST += add-to-archive cvsuser.c archive.dir.tar gettextsrcdir = $(datadir)/gettext -gettextsrc_DATA = archive.@ARCHIVE_FORMAT@.tar.gz +gettextsrc_DATA = $(ARCHIVE_@ARCHIVE_FORMAT@) +ARCHIVE_dirgz = archive.dir.tar.gz +ARCHIVE_dirbz2 = archive.dir.tar.bz2 +ARCHIVE_dirxz = archive.dir.tar.xz +ARCHIVE_git = archive.git.tar.gz +ARCHIVE_cvs = archive.cvs.tar.gz -# The archive.dir.tar.gz is not in the CVS. Alpha-testers must use the one from +# The archive.dir.tar is not in the CVS. Alpha-testers must use the one from # an already installed release. -archive.dir.tar.gz: +archive.dir.tar: if test -f $(gettextsrcdir)/archive.dir.tar.gz; then \ - cp -p $(gettextsrcdir)/archive.dir.tar.gz $@; \ + gzip -d -c < $(gettextsrcdir)/archive.dir.tar.gz > $@-t && mv $@-t $@; \ else \ - echo "archive.dir.tar.gz is not under version control. Please copy the archive.dir.tar.gz from an already installed release to gettext-tools/misc/." 1>&2; \ - exit 1; \ + if test -f $(gettextsrcdir)/archive.dir.tar.bz2; then \ + bzip2 -d -c < $(gettextsrcdir)/archive.dir.tar.bz2 > $@-t && mv $@-t $@; \ + else \ + if test -f $(gettextsrcdir)/archive.dir.tar.xz; then \ + xz -d -c < $(gettextsrcdir)/archive.dir.tar.xz > $@-t && mv $@-t $@; \ + else \ + echo "archive.dir.tar is not under version control. Please copy the archive.dir.tar.{gz,bz2,xz} from an already installed release to gettext-tools/misc/ and decompress it there." 1>&2; \ + exit 1; \ + fi; \ + fi; \ fi +MOSTLYCLEANFILES += archive.dir.tar-t -# The archive.git.tar.gz is generated from archive.dir.tar.gz. -archive.git.tar.gz: archive.dir.tar.gz - if test -f archive.dir.tar.gz; then \ - inputfile=archive.dir.tar.gz; \ +# The archive.dir.tar.gz is generated from archive.dir.tar. +archive.dir.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ else \ - inputfile='$(srcdir)'/archive.dir.tar.gz; \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + gzip -c -9 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.gz-t + +# The archive.dir.tar.bz2 is generated from archive.dir.tar. +archive.dir.tar.bz2: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + bzip2 -c -9 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.bz2-t + +# The archive.dir.tar.xz is generated from archive.dir.tar. +archive.dir.tar.xz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + xz -c -5 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.xz-t + +# The archive.git.tar.gz is generated from archive.dir.tar. +archive.git.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ fi; \ ./convert-archive dir git "$$inputfile" $@ -# The archive.cvs.tar.gz is generated from archive.dir.tar.gz. -archive.cvs.tar.gz: archive.dir.tar.gz - if test -f archive.dir.tar.gz; then \ - inputfile=archive.dir.tar.gz; \ +# The archive.cvs.tar.gz is generated from archive.dir.tar. +archive.cvs.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ else \ - inputfile='$(srcdir)'/archive.dir.tar.gz; \ + inputfile='$(srcdir)'/archive.dir.tar; \ fi; \ ./convert-archive dir cvs "$$inputfile" $@ diff --git a/gettext-tools/misc/add-to-archive b/gettext-tools/misc/add-to-archive index 61b8da5..ccc7f46 100755 --- a/gettext-tools/misc/add-to-archive +++ b/gettext-tools/misc/add-to-archive @@ -18,7 +18,7 @@ # Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz # Adds the infrastructure files for gettext version 0.xx.yy to the reposutory -# in the archive.dir.tar.gz file. +# in the archive.dir.tar file. if test $# != 1; then echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz" @@ -87,10 +87,10 @@ work_archive=`pwd`/"$work_dir/archive" # Add the contents of this directory to the repository. mkdir autopoint-files -(cd autopoint-files && tar xfz ../archive.dir.tar.gz) +(cd autopoint-files && tar xf ../archive.dir.tar) mkdir autopoint-files/$pack_ver (cd "$work_archive" && tar cf - .) | (cd autopoint-files/$pack_ver && tar xf -) -(cd autopoint-files && tar cfz ../archive.dir.tar.gz --owner=root --group=root *) +(cd autopoint-files && tar cf ../archive.dir.tar --owner=root --group=root *) # Clean up. rm -rf autopoint-files diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index 4de582a..48f661d 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -387,10 +387,15 @@ mkdir "$work_dir" || { # -------+-----------------------------+--------------------+ case "@ARCHIVE_FORMAT@" in - dir) - # The archive of different versions is very large, but using it does not - # require special tools. - gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver") + dir*) + # The archive of different versions is very large (unless xz compression is + # used), but using it does not require special tools. + case "@ARCHIVE_FORMAT@" in + dirgz) gzip -d -c < "$gettext_dir/archive.dir.tar.gz" ;; + dirbz2) bzip2 -d -c < "$gettext_dir/archive.dir.tar.bz2" ;; + dirxz) xz -d -c < "$gettext_dir/archive.dir.tar.xz" ;; + esac \ + | (cd "$work_dir" && tar xf - "gettext-$ver") if test `find "$work_dir" -type f -print | wc -l` = 0; then rm -rf "$work_dir" func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" diff --git a/gettext-tools/misc/convert-archive.in b/gettext-tools/misc/convert-archive.in index f874781..0088576 100644 --- a/gettext-tools/misc/convert-archive.in +++ b/gettext-tools/misc/convert-archive.in @@ -17,8 +17,8 @@ # # Usage: convert-archive FROM TO [FROMFILE [TOFILE]] -# where FROM is dir or cvs or git -# and TO is dir or cvs or git +# where FROM is dir or dirgz or dirbz2 or dirxz or cvs or git +# and TO is dir or dirgz or dirbz2 or dirxz or cvs or git # This will read FROMFILE (default: archive.$FROM.tar.gz) # and produce TOFILE (default: archive.$TO.tar.gz). @@ -89,8 +89,15 @@ mkdir "$unpacked" || { # Unpack the original archive. case "$from" in - dir) - gzip -d -c < "$fromfile" | (cd "$unpacked" && tar xf -) \ + dir*) + { case "$from" in + dir) cat < "$fromfile" ;; + dirgz) gzip -d -c < "$fromfile" ;; + dirbz2) bzip2 -d -c < "$fromfile" ;; + dirxz) xz -d -c < "$fromfile" ;; + esac + } \ + | (cd "$unpacked" && tar xf -) \ || func_fatal_error "file copy failed" ;; @@ -234,9 +241,15 @@ done # Create the target archive. case "$to" in - dir) + dir*) (cd "$unpacked" && $TAR cf - $TAR_OPTIONS *) \ - | gzip -c -9 > "$tofile" \ + | { case "$to" in + dir) cat > "$tofile" ;; + dirgz) gzip -c -9 > "$tofile" ;; + dirbz2) bzip2 -c -9 > "$tofile" ;; + dirxz) xz -c -5 > "$tofile" ;; + esac + } \ || func_fatal_error "archive creation failed" ;; |