bxtools icon indicating copy to clipboard operation
bxtools copied to clipboard

../configure && make doesn't work in a subdirectory

Open sjackman opened this issue 8 years ago • 4 comments

It's helpful to be able to build in a subdirectory when working with multiple architectures, such as both Linux and macOS.

mkdir build
cd build
../configure
make
make  all-recursive
Making all in SeqLib/htslib
/bin/sh: line 0: cd: SeqLib/htslib: No such file or directory
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

sjackman avatar Apr 19 '17 16:04 sjackman

Will look into this. Not immediately sure how to get autotools to do this.

walaj avatar Apr 19 '17 18:04 walaj

It's usually a matter of using $srcdir, $builddir, $top_srcdir, and $top_builddir as appropriate in the Makefile.am.

sjackman avatar Apr 19 '17 19:04 sjackman

Yeah, that's where I'm stuck. It works in the other Makefile.am files, but not the main one. I'm seeing this after running automake:

Makefile.am:2: error: required directory ./$(srcdir)/SeqLib/htslib does not exist

with this Makefile.am

AUTOMAKE_OPTIONS = foreign                                                                                                                                                                                
SUBDIRS = $(srcdir)/SeqLib/htslib $(srcdir)/SeqLib/src src

Not sure why that doesn't work...

walaj avatar Apr 19 '17 19:04 walaj

walaj/htslib doesn't use automake. There's no Makefile.am nor Makefile.in file, just a bare Makefile. It may be possible to hack it up to get it working, but it may not be worth the effort.

sjackman avatar Apr 19 '17 19:04 sjackman