2004-04-24 Alexandre Duret-Lutz <adl@gnu.org>
+ * lib/Automake/VarDef.pm (append): Turn VAR_ASIS variables into
+ VAR_PRETTY variables to work around make implementation with
+ limited line length, such as OSF1/Tru64 make.
+ * tests/longline.test: New file.
+ * tests/Makefile.am (TESTS): Add it.
+ * tests/pluseq3.test, tests/pluseq8.test: Adjust.
+ Report from Simon Josefsson.
+
* lib/am/tags.am (TAGS): Pass `.' to Exuberant Ctags if
--etags-include is used but no other files are supplied, so it
creates the TAGS file anyway.
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
+ empty_fix=.; \
else \
include_option=--include; \
+ empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
* Tar format can be chosen with the new options tar-v7, tar-ustar, and
tar-pax. The new option filename-length-max=99 helps diagnosing
- filenames that are too long for tar-v7.
+ filenames that are too long for tar-v7. (PR/414)
+
+* Variables aumented with `+=' are now automatically flattened (i.e.,
+ trailing backslashes removed) and then wrapped around 80 colummns
+ (adding trailing backslashes). In previous versions, a long series
+ of
+ VAR += value1
+ VAR += value2
+ VAR += value3
+ ...
+ would result in a single-line definition of VAR that could possibly
+ exceed the maximum line length of some make implementations.
+
+ Non-augmented variables are still output as they are defined in
+ the Makefile.am.
\f
New in 1.8:
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
+ empty_fix=.; \
else \
include_option=--include; \
+ empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
$val .= ' ';
}
$self->{'value'} = $val . $value;
+ # Turn ASIS appended variables into PRETTY variables. This is to
+ # cope with `make' implementation that cannot read very long lines.
+ $self->{'pretty'} = VAR_PRETTY if $self->{'pretty'} == VAR_ASIS;
}
=item C<$def-E<gt>value>
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
+ empty_fix=.; \
else \
include_option=--include; \
+ empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
lisp6.test \
listval.test \
location.test \
+longline.test \
ltcond.test \
ltcond2.test \
ltconv.test \
lisp6.test \
listval.test \
location.test \
+longline.test \
ltcond.test \
ltcond2.test \
ltconv.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Long lines of += should be wrapped.
+# Report from Simon Josefsson.
+
+. ./defs || exit 1
+
+set -e
+
+(echo DUMMY = some_long_filename_1;
+for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
+do
+ echo DUMMY += some_long_filename_$i
+done) > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+test 80 -ge `grep DUMMY Makefile.in | wc -c`
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
cat > Makefile.am << 'END'
if CHECK
-data_DATA = zar
+data_DATA = zarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
else
data_DATA =
endif
$ACLOCAL || exit 1
$AUTOMAKE
-grep '^@CHECK_TRUE@data_DATA = zar \\$' Makefile.in
-grep '^@CHECK_TRUE@ doz$' Makefile.in
+grep '^@CHECK_TRUE@data_DATA = zarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr \\$' Makefile.in
+grep '^@CHECK_TRUE@ doz$' Makefile.in
grep '^@CHECK_FALSE@data_DATA = dog$' Makefile.in
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
-sed -n -e '/^VAR =.*\\$/ {
+sed -n -e '/^VAR =/ {
:loop
p
n