neteler
November 24, 2008, 12:18pm
1
Hi,
the lib/nviz/Makefile fails with
[neteler@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
On Nov 24, 2008, at 6:18 AM, Markus Neteler wrote:
Hi,
the lib/nviz/Makefile fails with
[neteler@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? 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
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
The equator is so long, it could encircle the earth completely once.
neteler
November 24, 2008, 3:22pm
3
On Mon, Nov 24, 2008 at 4:10 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:
On Nov 24, 2008, at 6:18 AM, Markus Neteler wrote:
Hi,
the lib/nviz/Makefile fails with
[neteler@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@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
On Nov 24, 2008, at 9:22 AM, Markus Neteler wrote:
I am using GNU make on the grass.osgeo.org server (which I currently restore):
Has it worked on grass.osgeo.org before? It's been in that form for many months.
Maybe make-master Glynn has an idea what's wrong.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Those people who most want to rule people are, ipso-facto, those least suited to do it."
- A rule of the universe, from the HitchHiker's Guide to the Galaxy
neteler
November 24, 2008, 3:41pm
5
On Mon, Nov 24, 2008 at 4:32 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:
On Nov 24, 2008, at 9:22 AM, Markus Neteler wrote:
I am using GNU make on the grass.osgeo.org server (which I currently
restore):
Has it worked on grass.osgeo.org before? It's been in that form for many
months.
I have no idea - automated jobs... one has to check an older binary if nviz
was in or not.
Only now, after the disk crash I am checking all jobs. The machine runs
Fedora 4, so that's fairly old - unfortunately we didn't get a newer one
installed (ask OSGeo-SAC why).
Maybe make-master Glynn has an idea what's wrong.
Let's hope. But your suggestion seems to work?
Markus
Markus Neteler wrote:
>> the lib/nviz/Makefile fails with
>>
>> [neteler@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@xblade14 grass6_svn_head_progmanual]$ rpm -qil make-3.80-7
Looking at the ChangeLog and NEWS files, this feature appears to have
been introduced in 3.81:
* The "else" conditional line can now be followed by any other valid
conditional on the same line: this does not increase the depth of the
conditional nesting, so only one "endif" is required to close the
conditional.
--
Glynn Clements <glynn@gclements.plus.com>
neteler
November 26, 2008, 9:18pm
7
On Mon, Nov 24, 2008 at 4:10 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:
On Nov 24, 2008, at 6:18 AM, Markus Neteler wrote:
the lib/nviz/Makefile fails with
...
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
Submitted.
thanks
Markus