[GRASS-dev] compiling today's grass7 trunk: ogr_srs_api.h: No such file or directory

Glynn Clements glynn at gclements.plus.com
Thu Jun 18 14:12:49 EDT 2009


Moritz Lennert wrote:

> >> In swig/python/Makefile, I see
> >> 
> >> proj_wrap_c_FLAGS = $(PROJINC) $(GDALCFLAGS)
> >> 
> >> but I don't really understand where this comes into play.
> > 
> > This should ensure that proj_wrap.c can find the PROJ and GDAL 
> > headers.
> 
> Yes, but what I meant is that I don't see where the proj_wrap_c_FLAGS
> variable is read.

include/Make/Compile.make:

$(OBJDIR)/%.o : %.c $(LOCAL_HEADERS) $(EXTRA_HEADERS) $($*_c_FLAGS) | $(OBJDIR)
	$(call compiler_c)

$* is the stem, i.e. the part of the name which the % matches, so if
the target is $(OBJDIR)/proj_wrap.c, $* is proj_wrap and $*_c_FLAGS is
proj_wrap_c_FLAGS.

Except ... variables in dependency lines are substituted when the file
is read, and proj_wrap_c_FLAGS hasn't been defined at that point. I'll
change the compilation rules to move this into the actions.

Try r37929; I can't easily test it, as neither PROJ nor GDAL require
any -I switches on my system.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list