www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/02/14:06:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 2 Apr 2004 14:05:40 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Dave Korn <dk AT artimi DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Weirdness in cygutils-1.2.5-1.sh ?
In-Reply-To: <NUTMEGE4zyYJOGESS9i00000333@NUTMEG.CAM.ARTIMI.COM>
Message-ID: <Pine.GSO.4.56.0404021400080.2840@slinky.cs.nyu.edu>
References: <NUTMEGE4zyYJOGESS9i00000333 AT NUTMEG DOT CAM DOT ARTIMI DOT COM>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Fri, 2 Apr 2004, Dave Korn wrote:

>   Just trying to build the cygutils from the source distro, and I'm having a
> little trouble with the build script:
>
> -----snip-----
> conf() {
>   (cd ${objdir} && \
>   CFLAGS="${MY_CFLAGS}" ${srcdir}/configure \
>   --srcdir=${srcdir} --prefix=${prefix} \
>   --exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
>   --libdir=${prefix}/lib --includedir=${prefix}/include \
>   --mandir=${prefix}/share/man --infodir=${prefix}/share/info
> )}
> -----snip-----
>
>   But when I say
>
> -----snip-----
> export MY_CFLAGS='-g -O0'
> cygutils-1.2.5-1.sh conf
> cygutils-1.2.5-1.sh build
> -----snip-----
>
> I still get the default '-g -O2' flags.  There's no trace of my -O0 anywhere
> in the makefile.  Even trying setting
>
> -----snip-----
> export CFLAGS='-g -O0'
> export MY_CFLAGS='-g -O0'
> cygutils-1.2.5-1.sh conf
> cygutils-1.2.5-1.sh build
> -----snip-----
>
> doesn't make any difference.
>
>   Is it a bogus assumption that the configure script will respect CFLAGS?
> Is this just standard cygwin makescript boilerplate, kindof the same way
> that the top-level configure script goes and passes every option to every
> one of the subconfigures whether relevant or not?  It's a bit misleading to
> see that line there and think you can set the cflags for the build in the
> same way you can with gnu makefiles.
>
>     cheers,
>       DaveK

Dave,

See line 61 of the script -- it sets the MY_CFLAGS variable explicitly.
It's a shell script, not a Makefile, so environment settings don't
override variables that are set explicitly.

FWIW, the latest generic-build-script corrects this issue.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019