Results 1 to 4 of 4
I've been a Windows programmer for some times. I've written some Unix based C++ programs for myself over the years, but basically very simply things with either very simple make ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-06-2005 #1
- Join Date
- Mar 2005
configuring and makefiles and such
Most applications one has to build come with configure and Makefile. configure is executeable and the Makefiles usually have options for installations and such.
My first question is in regards to configure. It appears that configure collects information specific to the system which I assume is then used to populate constants in a header file which are then used in the app to make decisions about how to deal with different system functionality that may or may not be installed. Since most apps come with a configure script, I take it it's not built into the system. Surely people don't write their own from scratch for each application.
Is my understanding generally correct? Is there a list somewhere of the data collected? Is configure "configurable" to collect certain information? Any information on this would be helpful.
My next question is in regards to make files. Are these generally done by hand or are there tools that people generally use for building the make files. If so, what tools?
- 07-06-2005 #2
Re: configuring and makefiles and suchOriginally Posted by pdavis68Registered Linux user #270181
TechieMoe's Tech Rants
- 07-06-2005 #3
- Join Date
- Oct 2001
- Täby, Sweden
What you are interested in is probably the autoconf and automake tools. Autoconf creates the configure script from an M4 input file usually named configure.in or configure.ac. If you look in most package, you'll see configure.in or configure.ac along with them.
Automake is what create the Makefile.in files from Makefile.am input files. The actual Makefiles are then created by configure from the Makefile.in files.
Both of these tools are documented in great info in texinfo. See `'info Autoconf' and `info automake' (note that you must have a capital A in autoconf to get its texinfo).
- 07-07-2005 #4
Although Makefile.am files are some time a bit redundant, as dependending on what you are doing, and how complex it is, I've honestly found that it's a hell of a lot easier to just skip the automake step and write the Makefile.in by hand.
And if you ever are building a project that doesn't need ./configure for anything, you can just skip the Makefile.am/.in step and write a Makefile by hand. It's simple enough, IMHO.