diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-03 18:51:55 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-03 18:51:55 -0500 |
commit | 45d77264cab813a4465116a3ac33a0a44a1389e7 (patch) | |
tree | e20c6bd6bc765bb4d5099a79967dff96a4dbb582 /automake.txt | |
parent | 8b4ed19938c1314ea15eb0b507dcc5aadeb3d9e6 (diff) |
I lied about am_path being equivalent to `realpath -sm`
Diffstat (limited to 'automake.txt')
-rw-r--r-- | automake.txt | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/automake.txt b/automake.txt index b6b9184779..c9834d3f27 100644 --- a/automake.txt +++ b/automake.txt @@ -82,7 +82,9 @@ recursive Makefile: specified twice, once for each case. 2. if a prerequisite is in a directory "owned" by another Makefile, you must filter the pathname through `am_path`: - `$(call am_path,YOUR_PATH)`. + `$(call am_path,YOUR_PATH)`. Further, that path must NOT contain + a `..` segment; if you need to refer to a sibling directory, do it + relative to `$(topoutdir)` or `$(topsrcdir)`. Telling automake about your program ----------------------------------- @@ -93,8 +95,8 @@ are all prefixed with `am_`; this prefix may be changed by editing the The exception to this is the `am_path` variable, which is a macro that is used to make a list of filenames relative to the appropriate -directory, because unlike normal GNU (Auto)Make, $(outdir) isn't -nescessarily equal to '.'. See above. +directory, because unlike normal GNU (Auto)Make, `$(outdir)` isn't +nescessarily equal to `.`. See above. There are several commands that generate files; simply record the list of files that each command generates as the following variable @@ -148,15 +150,6 @@ If you have a `./configure` script, don't have it modify the `$(topoutdir)/config.mk` and have it generate that; then have it copy (or (sym?)link?) every `$(srcdir)/Makefile` into `$(outdir)/Makefile`. -If you're wondering, `am_path` is defined equivalently to: - - am_path = $(if $1,$(shell realpath -sm -- $1))` - -though it is implemented purely in Make, instead of calling out to -another program. Besides that older versions of coreutils don't have -`realpath`, calling to an external program like that can have a -_substantial_ slowdown on the parse time. - ---- Copyright (C) 2016 Luke Shumaker |