From: Bruno Haible Date: Mon, 19 Jan 2004 10:42:29 +0000 (+0000) Subject: Update DIST_SUBDIRS, not only SUBDIRS. X-Git-Tag: v0.14~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74588a6508dfd39c77c78638d1e326be9c42d82a;p=thirdparty%2Fgettext.git Update DIST_SUBDIRS, not only SUBDIRS. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index d036b779e..7ea377a31 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,9 @@ +2004-01-19 Bruno Haible + + * gettextize.in: Modify DIST_SUBDIRS like SUBDIRS, when it was found in + Makefile.am. + Reported by Dalibor Topic . + 2003-12-17 Bruno Haible * gettext-0.13.1 released. diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in index 97ae140d8..402d6c869 100644 --- a/gettext-tools/misc/gettextize.in +++ b/gettext-tools/misc/gettextize.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. +# Copyright (C) 1995-1998, 2000-2004 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -805,6 +805,29 @@ if test -f "$srcdir/Makefile.am"; then }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" func_modify_Makefile_am "(SUBDIRS): Remove $removed_directory." fi + if test -n "$added_directories"; then + if grep '^DIST_SUBDIRS[ ]*=' "$srcdir/Makefile.am" > /dev/null; then + sed -e "s%^\(DIST_SUBDIRS[ ]*=\)%\\1$added_directories %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(DIST_SUBDIRS): Add "`echo $added_directories | sed -e 's/ /, /g'`'.' + fi + fi + if test -n "$removed_directory"; then + sed -e '/^DIST_SUBDIRS[ ]*=/ { + :a + s%\([ ]\)'"$removed_directory"'[ ]%\1% + s%[ ]'"$removed_directory"'$%% + tb + :b + s%\\$%\\% + tc + bd + :c + n + ba + :d + }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(DIST_SUBDIRS): Remove $removed_directory." + fi if test -z "$m4dir_is_next"; then if grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" > /dev/null; then sed -e "s%^\(ACLOCAL_AMFLAGS[ ]*=\)%\\1 -I $m4dir %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp"