automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [FYI] [ng] internals: new variable $(am__newline)


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] internals: new variable $(am__newline)
Date: Sat, 2 Jun 2012 20:54:42 +0200

* lib/am/header-vars.am (am__newline): New, contains one single newline.
* t/internals.tap: Test it.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/am/header-vars.am |    5 +++++
 t/internals.tap       |   10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 9626744..4ff47db 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -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
diff --git a/t/internals.tap b/t/internals.tap
index 4b545b1..2c2fccd 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -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))' = 'address@hidden'
+
+.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
 
 :
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]