I'm trying to create a script to automatically compile apache. Sadly on my work I need to compile each an every apache I install.
So, I came up with this little code to run a command:
print("Source location %s" % source_location)
print("Configure command %s" % configure_command)
config = subprocess.Popen(configure_command, stdout=subprocess.PIPE, shell=True)
(output, err) = config.communicate()
config_status = config.wait()
print("Return configure status = %s" % config_status)
At the moment I'm stuck on the configure part.
Basically the configure line is like this:
/Volumes/nirvash/script/workarea/httpd-2.2.31/configure --prefix=/tmp/apache-2.2.31-instance1 --enable-mods-shared=all --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-deflate --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --with-included-apr --with-mpm=worker
The problem is that when the apache is compiling, it creates (mkdir) an "include" directory inside the httpd-2.2.31. But in this case the directory is created on the bin directory of my script.
So the directory is created were the script is running.
Is it possible to fix this? Is there any way to run the configure in the directory that is compiling?