Got it to work.

sem15% ls
Makefile.sfw         swig-1.3.35/
SCCS/                swig-1.3.35.tar.gz

Makefile.sfw
--------------------
#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)Makefile.sfw   1.9 08/02/09 SMI"

VER=swig-1.3.35

include ../Makefile.cmd

all: $(VER)/config.status
    (cd $(VER); env \
        LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
        CC=$(GCC) CXX=$(GXX) \
        "CFLAGS=$(CFLAGS)" \
        PATH=$(SFW_PATH) \
        MAKE=$(GMAKE) \
        LIBS=-lcurses \
        $(GMAKE) -e)
    @find . -name core -exec rm -f {} \;

test:   # there aren't any

install: all
    $(SH) ./install-less

$(VER)/config.status: $(VER)/configure
    (cd $(VER); env \
        CC=$(GCC) CXX=$(GXX) \
        "CFLAGS=$(CFLAGS)" \
        PATH=$(SFW_PATH) \
        MAKE=$(GMAKE) \
        ./configure --prefix=/usr)

$(VER)/configure: $(VER).tar.gz
    gzip -dc $(VER).tar.gz | tar xopf -
    touch $(VER)/configure

clean:
    -rm -rf $(VER)

include ../Makefile.targ


Bruce


Mike.Sullivan at sun.com wrote:
> >From sfwnv-discuss-bounces at opensolaris.org Fri Jun  6 13:46:59 2008
>
>   
>> Hi
>> I'm having a problem with the env that the Makefile.sfw is using. I've 
>> import my opensource code in the sfw workspace and if I run:
>> % ./configure
>>
>> % gmake
>>
>> Everything compiles and builds correctly.
>>
>> Now I've put in the Makefile.sfw in the directory above the last and run:
>>     
>>> make -f Makefile.sfw
>>> dmake: defaulting to parallel mode.
>>> See the man page dmake(1) for more information on setting up the 
>>> .dmakerc file.
>>> (cd swig-1.3.35; env \
>>>     CC= CXX= \
>>>     "CFLAGS=   -Xa  -xildoff -xc99=all " \
>>>       
>
> Those CFLAGS are Sun Studio-specific. Which is ok because you're supposed
> to really use Sun Studio if you can, but sinec the CC/CXX settings above
> are null you're probably letting configure prefer gcc. 
>
> I wonder if perhaps you're doing that configure before you include
> Makefile.master, so the variables might not be set yet. But don't know
> where your actual Makefile.sfw is.
>
>   
>> configure:2916: checking for C compiler default output file name
>> configure:2943: gcc    -Xa  -xildoff -xc99=all    conftest.c  >&5
>> gcc: unrecognized option `-Xa'
>> gcc: language c99=all not recognized
>> ld: fatal: file conftest.c: unknown file type
>> ld: fatal: File processing errors. No output written to a.out
>> collect2: ld returned 1 exit status
>>
>> It looks like it is now looking for a gcc version of 5 or greater but if 
>>     
>
> well no there is none (that 5 is part of shell redirection I'd think).
> Looks more to me that it decided to use gcc but you told it to use -Xa and it
> got upset.
>
>   
>> I run configure without Makefile.sfw it works fine.
>>     
>
> well at that point you're probably not telling it to use those CFLAGS.
> I'd have to see your Makefile.sfw to tell for sure, but you should
> compare yours with others probably.
>
>       Mike
>   


Reply via email to