I doing some finishing touches on a module and I have a question about
the Makefile process in CVS current.
I have a front-end module with several sub-modules it calls for various
tasks. I would like to exclude one of the modules from being compiled
if the system does not have lseek().
Working inside the code is handled easily by #ifdef HAVE_LSEEK... How
would I go about excluding a module from being compiled in the GRASS
Makefile?
I can't simply do (in Makefile):
SUBDIRS = front.end \
module.one \
#ifdef HAVE_LSEEK
module.two \
#endif
module.three
Suggestions?
--
Brad Douglas <rez@touchofmadness.com>
Brad Douglas wrote:
I doing some finishing touches on a module and I have a question about
the Makefile process in CVS current.
I have a front-end module with several sub-modules it calls for various
tasks. I would like to exclude one of the modules from being compiled
if the system does not have lseek().
The core GRASS libraries won't work on a system without lseek().
Working inside the code is handled easily by #ifdef HAVE_LSEEK... How
would I go about excluding a module from being compiled in the GRASS
Makefile?
I can't simply do (in Makefile):
SUBDIRS = front.end \
module.one \
#ifdef HAVE_LSEEK
module.two \
#endif
module.three
Suggestions?
SUBDIRS = front.end \
module.one
ifneq ($(HAVE_LSEEK),)
SUBDIRS += module.two
endif
SUBDIRS += module.three
Note: you have to define a make variable called HAVE_LSEEK; you can't
access the preprocessor macros in config.h from a Makefile.
--
Glynn Clements <glynn@gclements.plus.com>