Justin, (Cc to Grass)
Your suggestion seems harmless enough. If you have
the time to go through all the Gmakefiles, and if you
think this is an important venture then go for it.
Please don't break the system though.
John Huddleston
----- Original Message -----
From: Justin Hickey <jhickey@impact1.hpcc.nectec.or.th>
To: Markus Neteler <neteler@geog.uni-hannover.de>
Cc: John Huddleston <jhudd@lamar.colostate.edu>
Sent: Monday, August 21, 2000 10:01 AM
Subject: Re: [GRASS5] XDRLIB make variable
Hello Markus
On Aug 19, 5:55pm, Markus Neteler wrote:
> > Thank you for the information. I will remove the XDRLIB from any LIBES
> > definitions I find and add it to the appropriate link lines instead.
> Please don't! You will have to find another solution...
> It is required on various platforms and not -lrpclib there.
>
> The configure takes care for this.
It appears there is some confusion as to what I am proposing, it does not
concern the actual definition of XDRLIB, only where that definition is
used in
Gmakefiles. In several Gmakefiles there is a definition for LIBES, which
is
often used as a target further down in the file in order to indicate that
if a
library changes, then the current program should be recompiled. It usually
looks something like this
$(LIBES): #
Sometimes, people include the variables MATHLIB and XDRLIB in the
definition of
the LIBES variable. This is what I contend is an error. The reasoning is
as
follows. The MATHLIB and XDRLIB variables are usually defined something
like
-lm or -lrpclib which are options to the link command. It does not make
any
sense to have these in a target list since they are not objects that can
be
made. In fact some make programs treat this as an error. The expanded line
would look something like the following (where LIBES = $(GISLIB)
$(VASKLIB)
$(MATHLIB) $(XDRLIB) )
/home/grass/src/libes/libgis.a
/home/grass/src/libes/libvask.a -lm -lrpclib: #
As you can see, this line does not make sense in a Makefile. Therefore,
XDRLIB
and MATHLIB variables should not be included in LIBES definitions. What
people
are assuming is that since the names of the variables end in LIB, they can
be
included in the LIBES definition like the others. But their definitions do
not
form the name of a library, only the option required for the linker.
The proper place for these variables is on the link line of the Gmakefile
as
follows:
$(CC) $(LDFLAGS) -o $@ $(LIST) $(LIBES) $(XDRLIB) $(MATHLIB)
This is the change that I have proposed. Take the XDRLIB definition out of
the
LIBES definition and put it only on the link line instead. All that is
changing
is that it is being removed from the target list for LIBES.
Does this clarify the problem?
--
Sincerely,
Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
People who think they know everything are very irritating to those
of us who do. ---Anonymous
Jazz and Trek Rule!!!
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'