]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] internals: new variable $(am__newline)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 2 Jun 2012 18:52:26 +0000 (20:52 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 2 Jun 2012 19:44:00 +0000 (21:44 +0200)
* lib/am/header-vars.am (am__newline): New, contains one single newline.
* t/internals.tap: Test it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/header-vars.am
t/internals.tap

index 962674469d49719eba76cbffeda3f32292198919..4ff47dba334a602cc52f280373f8e69e1d4ae122 100644 (file)
@@ -29,6 +29,11 @@ am__dquote := "
 am__squote := '
 # "` # Fix font-lock.
 
+define am__newline
+
+
+endef
+
 ## Makefiles generated by Automake-NG require GNU make >= 3.81.
 ## The .FEATURES special variable has been introduced in that make
 ## version, so use it as a witness to determine whether the current
index 4b545b144fa8bd01ff5c1eae13d4723e75f47c8d..2c2fccda699c4eb8a7c925b911aeb191fa2c1d50 100755 (executable)
@@ -19,7 +19,7 @@
 am_create_testdir=empty
 . ./defs || Exit 1
 
-plan_ 7
+plan_ 8
 
 cp "$am_amdir"/header-vars.am . \
   || fatal_ "fetching makefile fragment headers-vars.am"
@@ -161,6 +161,13 @@ test-canonicalize:
        test '$(call am__canon,$(comma))' = '_'
        test '$(call am__canon,$(bslash)$(comma))' = '__'
        test '$(call am__canon,x$(comma)@$(bslash))' = 'x_@_'
+
+.PHONY: test-newline
+test-newline:
+       @echo OK > foo$(am__newline)@touch bar$(am__newline)-false > baz
+       test `cat foo` = OK
+       test -f bar
+       test -f baz
 END
 
 command_ok_  am__strip_firstword        $MAKE test-strip-firstword
@@ -170,5 +177,6 @@ command_ok_  am__test_strip_suffixes    $MAKE test-strip-suffixes
 command_ok_  am__tolower                $MAKE test-tolower
 command_ok_  am__toupper                $MAKE test-toupper
 command_ok_  am__canon                  $MAKE test-canonicalize
+command_ok_  am__newline                $MAKE test-newline
 
 :