Re: [ng-spice-devel] getopt (fwd)


To ng-spice-devel@ieee.ing.uniroma1.it
From mcmahill@mtl.mit.edu
Date Mon, 16 Apr 2001 14:52:59 -0400 (EDT)
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <Pine.LNX.3.96.1010416200526.13632C-100000@ieee.ing.uniroma1.it >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it


A couple of options.  

1) use autoconf to define a variable like

GETOPTSRCS= getopt.c getopt1.c

if they're needed or 

GEOPTSRCS=

if not and then add $(GETOPTSRCS) to the list of source files.


2) a different option is #ifdef-like things in the Makefile, but this
tends to be dependent on the exact make you're using.  For example in BSD
make, you can do

.ifdef FOO

# insert condition make stuff here
.endif

and in GNU make, it looks more like,
ifdef FOO

# stuff...
endif

I'd suggest the former unless you're forcing GNU make on everyone.

-Dan

On Mon, 16 Apr 2001, p.nenzi@ieee.org wrote:

> On Mon, 16 Apr 2001 mcmahill@mtl.mit.edu wrote:
> 
> > Here are the getopt files.
> 
> Thnak you, I will work on them. Doe anybody knows if there is a way to
> #ifdef a Makefile ?
> 
> Bye,
> Paolo
> 


Partial thread listing: