diff options
-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 \ |