}
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
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
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
: