-
Notifications
You must be signed in to change notification settings - Fork 231
Internals: Autotools Build System
Mahrud Sayrafi edited this page Aug 29, 2020
·
4 revisions
Work in progress. Contributors: Tim Duff, (your-name-here)
Step 1 is perhaps optional if you don't intend to submit a pull request.
Contents of source directory M2/M2/
- README: generally a good place to start
- BUILD directory: "This directory may be used as a convenient location for the build directory trees."
- INSTALL & INSTALL.mac: Instructions. See OS-specific cheatsheets (to be written.)
- Macaulay2 directory: contains most of Macaulay2 itself, w/ important subdirectories
- configure.ac: autoconf script that generates actual configure file
- distributions:
- deb -> ubuntu, debian
- dmg -> Mac
- freebsd
- other OS? tar file
- libraries
- obtained from tar files
- eg 4ti2, gfan
- each directory contains instructions for how to build
- submodules
- like "libraries", but obtained from git
GNU paradigm: configure, then make. In this example, build directory is M2/M2/BUILD/cleveland
cd M2/M2/
make
./configure -h
mkdir BUILD/cleveland
cd BUILD/cleveland
../../configure --enable-download
make
Tips
- potentially helpful make flags
- -jn : use n threads
- -C dir : recompile only in dir
- there are OS-specific additional instructions
- for instance, set FC = gfortran for Debian systems
- configure options
- some standard (like --help)
- some less standard (--disable-gfan)
Things configure does:
- output: version, environment variables, OS, many checks
- checks for libraries (eg. mpir) and builds if not there / not right version. tricky. cMake improvements?
- starts to create files needed for make
- transformation: eg. foo.in -> foo. replaces identifiers (@PACKAGE_NAME) with their system-specific values
- can define macros w/ autoconf
- AC_DEFUN. some other way?
- arguments need square brackets -- final part created by AC_OUTPUT
- how to use make
- anything else?
Quick links:
Homepage | Projects | Packages | Documentation | Events | Google Group