summaryrefslogtreecommitdiff
path: root/automake.txt
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-03-03 18:51:55 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-03-03 18:51:55 -0500
commit45d77264cab813a4465116a3ac33a0a44a1389e7 (patch)
treee20c6bd6bc765bb4d5099a79967dff96a4dbb582 /automake.txt
parent8b4ed19938c1314ea15eb0b507dcc5aadeb3d9e6 (diff)
I lied about am_path being equivalent to `realpath -sm`
Diffstat (limited to 'automake.txt')
-rw-r--r--automake.txt17
1 files changed, 5 insertions, 12 deletions
diff --git a/automake.txt b/automake.txt
index b6b9184..c9834d3 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