diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-10-30 17:42:55 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-10-30 17:42:55 (EDT) |
commit | f69c33d586b58e274271052fc471acb7d4fd329e (patch) | |
tree | 9805aa6b1b0e8426329af7070a9f9d6d6ff3253d | |
parent | fef0be6737cf837f0733357413ebdc972c6d948c (diff) | |
download | firman.sh-f69c33d586b58e274271052fc471acb7d4fd329e.zip firman.sh-f69c33d586b58e274271052fc471acb7d4fd329e.tar.gz firman.sh-f69c33d586b58e274271052fc471acb7d4fd329e.tar.bz2 |
Makefile.am: Finish fixing out-of-tree builds
-rw-r--r-- | Makefile.am | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 415ad97..60adb4b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,14 +22,17 @@ sbin_PROGRAMS = firman firman_SOURCES = # Hack to work around Automake's lack of support for linking programs in other # languages. -firman_LDADD = $(firman_SOURCES) +# Even uglier to support out-of-tree builds with VPATH. firman_LINK = \ set -e; \ vpath='$(VPATH)'; \ - for f in $(firman_LDADD); do \ - $(SH) -n "$${vpath}$${vpath:+/}$${f}"; \ + sources=''; \ + for f in $(firman_SOURCES); do \ + f="$${vpath}$${vpath:+/}$${f}"; \ + sources="$${sources} $${f}"; \ + $(SH) -n "$${f}"; \ done; \ - '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh + '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh $${sources} EXTRA_DIST = \ autogen.sh \ |