Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-20-2007, 02:52 PM
|
#1
|
|
Member
Registered: Nov 2003
Distribution: gentoo, fedora
Posts: 60
Rep:
|
autotools / makefile.in woes
I'm struggling through learning autotools to convert my project from static makefiles and I'm almost there.
I've got everything working except for a proper makefile.in
right now it's just a copy of my original makefile.
My issue now is i have no clue what variables from autotools i'm supposed to use (such as where to put the binary or project assets, or what variables are called for the ldflags or cflags etc made by ./configure.
I've looked at roughly 10 sites and they all either seem to be out of date or go into way too much detail and I get lost.
I guess i'm looking for either a basic tutorial (but not excessively so - most of the tutorials i've found dont even mention the makefile.in) or a function-list style thing for the standard vars created by autotools for use in the makefile.
Thank you.
|
|
|
|
11-21-2007, 12:28 PM
|
#2
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by c0uchm0nster
I've got everything working except for a proper makefile.in
|
Generally, you don’t hand-write Makefile.in. Usually, you hand-write Makefile.am (or sometimes Makefile.in.in). This is translated into Makefile.in by automake.
|
|
|
|
11-21-2007, 12:31 PM
|
#3
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Also, a good source of information about this stuff is Autobook.
|
|
|
|
11-21-2007, 06:59 PM
|
#4
|
|
Member
Registered: Nov 2003
Distribution: gentoo, fedora
Posts: 60
Original Poster
Rep:
|
thanks for the replies. and sorry about the typo on makefile.in - i did mean .am
I'll take a look at the book, but as I mentioned in my original post I'm really looking for something that's not amazingly basic, but also not an entire books worth of information
I want something that says "hey, with a mostly basic configure.ac that just checks for the necessary libraries and names the project here are the vars you use in makefile.am for compiler, linker flags, what directories to install in, etc"
hopefully something along these lines exists
thanks
|
|
|
|
11-21-2007, 10:58 PM
|
#5
|
|
Senior Member
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 2,962
Rep: 
|
Makefile.am is actually the simple part and configure.ac is the more complex one. Really all a Makefile.am is a list of what to build, what files it needs, what compile and link options it takes, what (in addition to dependencies) it should include in a distro package, and what subdirectories to go into. info automake should help out, as well as libtool and autoconf. It took me forever just to be patient enough to learn them (because the docs all reference each other) but it's fairly simple once you get the basics. There are also a few make rules you can define to be executed at (un)install time.
Automake will generate a Makefile.in, which is a template makefile, from your Makefile.am. Autoconf will make a ./configure based on your configure.ac, which tells it which options to build that script with. When ./configure is run, it inserts the results of its tests into the generated Makefile.in to create a real makefile.
ta0kira
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|