[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 04/12] [ng] cleanup: remove a workaround for BSD ma
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 04/12] [ng] cleanup: remove a workaround for BSD make (comments continaution) |
Date: |
Mon, 21 May 2012 09:36:21 +0200 |
* automake.in (read_am_file) [$prev_state == IN_COMMENT]: GNU make always
honors escaped newlines in comments, so we don't need to have a workaround
for when that might not be the case.
* t/comment6.sh: Adjust and enhance.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 8 --------
t/comment6.sh | 35 ++++++++++++++++++++++-------------
2 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/automake.in b/automake.in
index 4351c14..f2aa402 100644
--- a/automake.in
+++ b/automake.in
@@ -6394,14 +6394,6 @@ sub read_am_file ($$)
}
elsif ($prev_state == IN_COMMENT)
{
- # If the line doesn't start with a '#', add it.
- # We do this because a continued comment like
- # # A = foo \
- # bar \
- # baz
- # is not portable. BSD make doesn't honor
- # escaped newlines in comments.
- s/^#?/#/;
$comment .= $spacing . $_;
}
else # $prev_state == IN_VAR_DEF
diff --git a/t/comment6.sh b/t/comment6.sh
index 9fd8d10..19fc43b 100755
--- a/t/comment6.sh
+++ b/t/comment6.sh
@@ -24,6 +24,8 @@ cat >> configure.ac <<'EOF'
AC_OUTPUT
EOF
+SOME_FILES=; unset SOME_FILES # Avoid spurious environment interference.
+
## There are two tests: one with backslashed comments at the top
## of the file, and one with a rule first. This is because
## Comments at the top of the file are handled specially
@@ -35,34 +37,41 @@ cat > Makefile.am << 'EOF'
file2 \
file3
-all-local:
- @echo Good
-
+.PHONY: test
+test:
+ test -z '$(SOME_FILES)'
EOF
+do_check ()
+{
+ $MAKE test
+ grep '^# SOME_FILES =' Makefile
+ # No useless munging please.
+ grep '#.*file[123]' Makefile && Exit 1
+ :
+}
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
-$MAKE
-
-grep '# SOME_FILES' Makefile
-grep '# *file3' Makefile
+do_check
cat > Makefile.am << 'EOF'
-all-local:
- @echo Good
+test: test2
+.PHONY: test test2
# SOME_FILES = \
file1 \
file2 \
file3
+
+test:
+ test -z '$(SOME_FILES)'
EOF
$AUTOMAKE
-./configure
-$MAKE
-grep '# SOME_FILES' Makefile
-grep '# *file3' Makefile
+./config.status
+do_check
:
--
1.7.9.5
- [Automake-NG] [PATCH 00/12] Several cleanups (with small backward incompatibilities), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 01/12] [ng] push_dist_common: don't directly append to an Automake::Variable, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 04/12] [ng] cleanup: remove a workaround for BSD make (comments continaution),
Stefano Lattarini <=
- [Automake-NG] [PATCH 02/12] [ng] cleanup: remove a workaround only needed by Solaris make, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 03/12] [ng] cleanup: remove obsolescent comments about subdir-objects and deptrack, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 06/12] [ng] cleanup: remove obsolete special-handling of default source for libs, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 05/12] [ng] cleanup: remove a workaround for BSD make (default sources and VPATH), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 08/12] [ng] config.h.{bot, top}: don't support anymore (distribution and deps), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 07/12] [ng] acconfig.h: don't support anymore (distribution and dependencies), Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 12/12] [ng] cleanup: don't support $(ACLOCAL_M4_SOURCES) anymore, it's obsolete, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 11/12] [ng] compile: don't support $(INCLUDES) anymore, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 10/12] [ng] mkinstalldirs: remove support for the script and the variable, Stefano Lattarini, 2012/05/21
- [Automake-NG] [PATCH 09/12] [ng] cleanup: minor cleanups in remake-hdr.am, Stefano Lattarini, 2012/05/21