automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird flags set by configure


From: Lars Hecking
Subject: Re: weird flags set by configure
Date: Wed, 6 Nov 2002 10:44:08 +0000
User-agent: Mutt/1.5.1i

address@hidden writes:
> 
> Wow, that saves me dual implementation of 'debug' and 'release' make
> targets. cool :-)
> 
> Yet 2 more newbie questions:
> 
> Q1. Why do I get:
>  -I. -I. -I.
> when make runs gcc?
> peekeing in the Makefile.in reveals:
> 
> DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
> 
> This raises 2 questions in itself:
>       a. what's wrong with "DEFAULT_INCLUDES =  -I. -I$(srcdir)" or, since
> my project's sources all lie in the root  (as much as I'd have liked it to
> be otherwise :-(..... ) "DEFAULT_INCLUDES =  -I." ? How do I get automake
> to make it so?
>       b. I have a bunch of headers (also part of my project, but not ALL
> the header files) that are #included using doublequotes, and that I would
> like to seperate to an include/ subdirectory in my project. can I do that
> without touching the #include precompiler directives in the sources
> (without adding "include/") by using -I ? If so, how would that be done?
> 
> 
> Q2. There was recently a thread about conditioning in makefile.am
> I do not yet fully understand how makefile.am is parsed. simply by being
> shoved into m4 like configure.in by autoconf? Does it use those same
> macros?
> 
> I'll quote a suggestion on this previous thread, to do something like:
> : FILES = somefile.c $(FILES_IF_SOMETHING) $(FILES_IF_SOMETHING_ELSE)
> something.c
> : if HAVE_SOMETHING
> : FILES_IF_SOMETHING = someotherfile.c
> : endif
> : if HAVE_SOMETHING_ELSE
> : FILES_IF_SOMETHING_ELSE = somethingelse.c
> : endif
> 
> What kind of stuff do I put in HAVE_SOMETHING" ? what variables are
> appliable here? shell environment variables? m4 macros? again, a reference
> to go somewhere and RTFM would be nice, regarding the non-trivial syntax of
> the Makefile.am file (as in advanced features like coditionals et cetra,
> not only the obvious which I've already read about such as primaries).
> 
> 
> --
> Miki Shapiro <address@hidden>
> Coder - Unixophile - Boarder - Quake God
> Aladdin Knowledge Systems
> ---------------------------------------------
> Tel: +972-(4)-8811403  ICQ: 3EE853
> ---------------------------------------------
> C++ Berkeley Burton Tribes
> Have board. Will ride.
> 
> On 11/04/2002 09:48:20 AM MST bob wrote:
> >
> >address@hidden <address@hidden> [2002-11-04 12:43:48
> +0200]:
> >> Small question:
> >>
> >> Why do my autoconf-generated configure scripts automatically fit in
> >> debugging info "-g -O2" (or -g if I ask nicely?)
> >> When I compile release versions of my code, how do I (elegantly) ask
> >> automake, or rather autoconf (through autoconf.in) to omit this from
> >> CXXFLAGS?
> >
> >GCC is viewed as being able to debug (-g) and optimize (-O2) at the
> >same time without any detriment.  Then if you want to strip the binary
> >to remove the debug information you can.  The make target to install
> >and strip is 'install-strip'.  Therefore the default is generally
> >good.
> >
> >If the compiler is not GCC then it only adds debugging (-g) and stops
> >there since most compilers can't do both at the same time.
> >
> >If you want to change this you can set CXXFLAGS at configure time.
> >
> >CFLAGS=-O CXXFLAGS=-O ./configure
> >
> >> The content of this email and any attachments are confidential and
> >> intended for the named recipient(s) only.
> >>
> >> If you have received this email in error please notify the sender
> >> immediately.
> >> Do not disclose the content of this message or make copies.
> >>
> >> This email was scanned by eSafe Mail for viruses, vandals  and other
> >> malicious content.
> >
> >Those quasi-legal scare footers are both worthless and annoying.
> >Please try to convince your company to remove them.  Alternately send
> >mail from other accounts which do not have them.
> >
> >Bob
> 
> 
> ******************************* IMPORTANT ! **********************************
> The content of this email and any attachments are confidential and intended 
> for the named recipient(s) only.
> 
> If you have received this email in error please notify the sender immediately.
> Do not disclose the content of this message or make copies.
> 
> This email was scanned by eSafe Mail for viruses, vandals  and other
> malicious content.
> ******************************************************************************

 1. Please don't top-post.
 2. Please don't add such ridiculous disclaimers to your email

 The include directives will start to make sense when you try to compile your
 source outside the source directory.

 To supply your own -D and -I directives, use AM_CPPFLAGS.

 The HAVE_SOMETHING would appear as first argument to AM_CONDITIONAL
 in configure.in.

 HTH. HAND.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]