Conversation
Conflicts: make.config.in
* Print full release version * Only put version in configure.ac
Following GNU coding standards here: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
New variables BOUT_INCLUDE_PATH, BOUT_LIB_PATH and BOUT_CONFIG_FILE
defined in make.config and bout-config files. These point to the
include paths for cflags, ldflags, and the make.config file.
During configure these variables are set to the working directory,
so the current process of compiling and running in the same directory
still works.
When "make install" is run, these paths are replaced in the installed
scripts, to point to the new locations.
The bout-config script "--prefix" option has been replaced by
"--config-file". This returns the full name of make.config.
A user makefile can be:
SOURCEC = myfile.cxx
include $(shell bout-config --config-file)
Alternatively, a more flexible but longer way is to use --cxx (compiler),
--cflags, --ld (linker), --libs
This method captures the flags pulled in by external codes like PETSc,
using the output.make targets in configure. If the make.config method
is used then the path to PETSc (for example) should be consistent with
the path used in configure.
The paths to the IDL and Python libraries can also be accessed using
bout-config --idlpath and --pythonpath to set up environment variables.
Also added a "make uninstall" target, which takes the same DESTDIR
argument as install, and deletes the installed files.
everything already depends on make.config, so I don't think this is needed (but might be wrong) This saves having to complicate the make rules or install config.status somewhere.
|
Note: The include files are installed under a "bout++" subdirectory, to avoid conflicts with system libraries. This doesn't affect any code because the paths (BOUT_INCLUDE_PATH) is included in the flags, and updated by make install. |
Retains the changes to BOUT_VERSION handling, and the RELEASE tag used in a few places.
Compiling examples away from source directory results in missing dependency for all. Since config.status isn't needed this just removes it. Small fix for installing IDL and python libraries: To avoid install failing when there are additional files or subdirectories the sources are more specifically defined (e.g. *.py rather than *)
|
Now merged in PR #550 Tested that the following ways to install work after installing BOUT++ with Move examples/conduction outside the source directory (so BOUT_TOP is not a parent directory)
|
|
Passing "--prefix=/some/install/path" to configure also works, same as passing to "make install". |
This allows BOUT++ to be installed to a directory, and maintain links to include files, libraries etc.
To test it, run
$ configure
$ make
$ make install prefix=$HOME/tmp/bout++/
This should install everything needed under $HOME/tmp/bout++ in bin, include, lib, share subdirectories. Finer control over installation directories should work though configure in a GNU-ish way.
Then add $HOME/tmp/bout++ to your PATH and try
$ bout-config --all
The examples/make-script code should then compile anywhere, linking against the installed library.
You can also try replacing the examples/conduction makefile with
which should find make.config using the bout-config script.