Suggested by Akim Demaille:
<http://lists.gnu.org/archive/html/automake-ng/2012-07/msg00228.html>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
am.dir = .am
# Its counterpart with an absolute path, for recipes that can chdir around.
-am.abs-dir = $(abs_builddir)/$(am.dir)
+am.dir.abs = $(abs_builddir)/$(am.dir)
# Its counterpart for use in subdir makefiles, in case they need to refer
# to the top-level $(am.dir) directory.
am.top-dir = $(top_builddir)/$(am.dir)
# Its counterpart with an absolute path and for use in subdir makefiles.
-am.abs-top-dir = $(abs_top_builddir)/$(am.dir)
+am.top-dir.abs = $(abs_top_builddir)/$(am.dir)
.PHONY: am--distclean-amdir
am--distclean-amdir:
#
# * internal variables:
# $(am.dir)
-# $(am.abs-dir)
+# $(am.dir.abs)
# $(am.top-dir)
-# $(am.abs-top-dir)
+# $(am.top-dir.abs)
#
# * cleaning rules and "make distcheck" interaction.
#
all-local: | $(am.dir) subdir
: > $(am.dir)/sub
: > $(am.top-dir)/top
- (cd ./subdir && : > $(am.abs-dir)/abs-sub)
+ (cd ./subdir && : > $(am.dir.abs)/abs-sub)
rmdir subdir
- (cd /tmp && : > $(am.abs-top-dir)/abs-top)
+ (cd /tmp && : > $(am.top-dir.abs)/abs-top)
END
sort > exp <<END