Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow out-of-tree builds #7

Closed
wants to merge 7 commits into from
Closed

Allow out-of-tree builds #7

wants to merge 7 commits into from

Conversation

Ace17
Copy link

@Ace17 Ace17 commented Apr 11, 2014

Here's a very simple patch allowing to do this (out of tree builds):

svn checkout svn://svn.code.sf.net/p/rtaudio/code/trunk rtaudio-code
cd rtaudio-code
mkdir build
cd build
../configure
make
make -C tests

@top_srcdir@ and @srcdir@ are predefined variables. They get replaced by autotools (make doesn't see them).

@garyscavone
Copy link
Contributor

Hi Sebastien,

I've played around with your contribution and here are my thoughts / experience:

  1. I was hoping that a more complete use of the autotools would help in terms of the number of files that need to be in the RtAudio directories. This is true in a sense, as the "config" subdirectory can be removed. The Makefile.in is replaced with a new Makefile.am.
  2. That said, once I run "autoreconf -fi" and "configure," I end up with a lot more "stuff" in the RtAudio directories. Some of these new files can be removed with "make distclean" but not many others, including the “m4/“, “autom4te.cache/“, “config/“, "configure", and “aclocal.m4".
  3. When I make an RtAudio release, I need to include a "configure" script and any files it needs (basically the stuff in the "config/" subdirectory generated by "autoreconf -fi") because many users won't have the autotools installed (and even I don't have them installed in Windows, where this needs to work too). The "config/" subdirectory generated by "autoreconf -fi" has many more files in it than what is currently used in RtAudio. As well, if I manually remove the above-mentioned files, run "configure" and then "make distclean", the Makefile regenerates the “autom4te.cache/“ and “aclocal.m4” files.

So, my opinion is this change doesn't really improve anything (other than out of tree builds) but rather makes things more messy (while also requiring a relatively recent version of automake, which some users may not have). I understand that there may be some danger in our using on a partial "piece" of the autotool tool chain (basically autoconf only) but it has been working fine for many years now.

Perhaps there is a way you can modify the existing Makefile.in and configure.ac to build "out of tree"?

Also, note that if using the “SUBDIRS=tests” statement in Makefile.am and then you run “make maintainer-clean” after configure, you get an error because “maintainer-clean” is not a target in the tests/Makefile

Regards,

--gary

@sonoro1234
Copy link
Contributor

I have nested RtAudio with CMake in my Lua binding without any modification or RtAudio:
https://github.com/sonoro1234/luaRtAudio

victor

@Ace17
Copy link
Author

Ace17 commented May 9, 2014

That's exactly the point: nesting RtAudio into another project without any modification.
It's nice to know it works with CMake.
My goal was to make it to also work with autoconf. Without using recursive make, which breaks inter-project dependency tracking and makes parallel builds impractical.

@sonoro1234
Copy link
Contributor

Hi Sebastien,

luaRtAudio has never been build outside win32 so your build testing in linux would be important for me.
Please tell me if further problems appear.

victor

@Ace17
Copy link
Author

Ace17 commented May 9, 2014

OK.
As this is not related to RtAudio, let's continue this discussion here:
sonoro1234/luaRtAudio#1

@garyscavone
Copy link
Contributor

This is very old now (and has conflicts) and there didn't seem to be further interest from others, so I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants