From: Stefano Lattarini Date: Sat, 2 Jun 2012 18:52:26 +0000 (+0200) Subject: [ng] internals: new variable $(am__newline) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dea4346c710904599d62d3b15df191b9d533866;p=thirdparty%2Fautomake.git [ng] internals: new variable $(am__newline) * lib/am/header-vars.am (am__newline): New, contains one single newline. * t/internals.tap: Test it. Signed-off-by: Stefano Lattarini --- diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 962674469..4ff47dba3 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 4b545b144..2c2fccda6 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))' = '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 :