[GRASS-dev] lib/nviz/Makefile: Makefile:14: Extraneous text after `else' directive

Markus Neteler neteler at osgeo.org
Mon Nov 24 10:22:13 EST 2008


On Mon, Nov 24, 2008 at 4:10 PM, William Kyngesburye
<woklist at kyngchaos.com> wrote:
> On Nov 24, 2008, at 6:18 AM, Markus Neteler wrote:
>
>> Hi,
>>
>> the lib/nviz/Makefile fails with
>>
>> [neteler at xblade14 nviz]$ make
>> Makefile:14: Extraneous text after `else' directive
>> Makefile:17: *** only one `else' per conditional.  Stop.
>>
>> It reads:
>>
>>    7  ifeq ($(OPENGL_WINDOWS),1)
>>    8  EXTRA_LIBS += $(OPENGLLIB) $(OPENGLULIB) -lgdi32
>>    9  else ifeq ($(OPENGL_X11),1)
>>   10  EXTRA_LIBS += $(XLIBPATH) $(OPENGLLIB) $(OPENGLULIB)
>>   11  EXTRA_CFLAGS += $(XCFLAGS)
>>   12  else
>>   13  EXTRA_LIBS += $(OPENGLLIB) $(OPENGLULIB)
>>   14  endif
>>
>> How to fix this?
>>
>> thanks
>> Markus
>
> Oh, I think I did that.  Haven't had problems before.  From the Gnu make
> manual:
>
>     conditional-directive
>     text-if-one-is-true
>     else conditional-directive
>     text-if-true
>     else
>     text-if-false
>     endif
>
> Are you using a non-Gnu make?

I am using GNU make on the grass.osgeo.org server (which I currently restore):

[neteler at xblade14 grass6_svn_head_progmanual]$ rpm -qil make-3.80-7
Name        : make                         Relocations: /usr
Version     : 3.80                              Vendor: Red Hat, Inc.
Release     : 7                             Build Date: Mon 07 Mar
2005 06:59:47 AM PST
Install Date: Mon 24 Nov 2008 04:02:56 AM PST      Build Host:
tweety.build.redhat.com
Group       : Development/Tools             Source RPM: make-3.80-7.src.rpm
Size        : 758347                           License: GPL
Signature   : DSA/SHA1, Fri 20 May 2005 10:34:29 AM PDT, Key ID b44269d04f2a6fd2
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.gnu.org/software/make/
Summary     : A GNU tool which simplifies the build process for users.


>  How about:
>
> ifeq ($(OPENGL_WINDOWS),1)
> EXTRA_LIBS += $(OPENGLLIB) $(OPENGLULIB) -lgdi32
> else
> ifeq ($(OPENGL_X11),1)
> EXTRA_LIBS += $(XLIBPATH) $(OPENGLLIB) $(OPENGLULIB)
> EXTRA_CFLAGS += $(XCFLAGS)
> else
> EXTRA_LIBS += $(OPENGLLIB) $(OPENGLULIB)
> endif
> endif

With that it compiles.

Markus


More information about the grass-dev mailing list