3

Why is needed to do (inside the container directory):

# cd /container/directory/
# ./configure

instead of:

# pwd
/external/path
# /container/directory/configure 

Maybe because calling ./configure from /container/directory/ are created files inside of /container/directory/

Is there the option to create the files (makefiles,etc ) inside of /container/directory/ calling from /external/path?

Something like:

# /container/directory/configure --CreateOutputFiles=/container/directory/
  • I see this, but [help of ./configuration](https://www.gnu.org/prep/standards/html_node/Configuration.html) other question [Configuration make](http://stackoverflow.com/questions/10961439/why-always-configure-make-make-install-as-3-seperate-steps) other related [Questions](http://stackoverflow.com/questions/5388986/makefiles-configure-files-and-other-compilation-tools-how-do-they-work-w?rq=1) –  Jul 14 '15 at 11:18

1 Answers1

0

The autotools are explicitly designed to work the way you are seeing (with the output files in the current directory as opposed to the directory of the configure script) because they are designed to support out-of-tree builds. That is the idea that a build can happen somewhere other than in the source directory.

This lets you have per-arch builds in a clean fashion, it lets you easily blow away just the built files and not the source files, etc.

I don't know if there is a reliable and portable way to automatically determine the location of the currently executing script (see Bash FAQ 028 for some discussion about this). If there isn't that makes doing what you want automatically difficult.

I'm not aware, offhand, of a flag that lets you set the output directory somewhere else but there might be one.

Etan Reisner
  • 77,877
  • 8
  • 106
  • 148