This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

makefiles aren't passing variables "correctly"


Where "correctly" is defined as "the way we want," at least.

In building src/limitsMEMBERS.o, I'm seeing

/tec/build/3test/gcc/g++ -B/tec/build/3test/gcc/ -nostdinc++ -L/tec/build/3test/sparc-sun-solaris2.8/libstd++-v3/src
-L/tec/build/3test/sparc-sun-solaris2.8/libstd++-v3/src/.libs -B/tec/build/Ebuild/sparc-sun-solaris2.8/bin/
-B/tec/build/Ebuild/sparc-sun-solaris2.8/lib/ -isystem /tec/build/Ebuild/sparc-sun-solaris2.8/include
-L/tec/build/3test/ld -D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ -I../../../unified/libstdc++-v3/include/std
-I../../../unified/libstdc++-v3/include/c -I.. -I../../../unified/libstdc++-v3/include -I./libio
-I../../../unified/libstdc++-v3/libio -I../../../unified/libstdc++-v3/libmath -I/tec/build/Ebuild/include -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -O0 -ggdb -c limitsMEMBERS.cc  -fPIC -DPIC -o .libs/limitsMEMBERS.o
In file included from limitsMEMBERS.cc:37:
../bits/std_limits.h:46:29: bits/std_cfloat.h: No such file or directory
gmake[3]: *** [limitsMEMBERS.lo] Error 1

The key thing here is

    -I../../../unified/libstdc++-v3/include/c

That *is* the correct location of bits/std_cfloat.h, but relative to
the top of the build directory, not one level down in the src directory.
We need another ".." in there.

src/Makefile.am has an assignment

    INCLUDES = [......] -I$(GLIBCPP_INCLUDES)

but again, that's relative to the top_builddir.  I tried overriding this
in src/Makefile.am, with no luck.

At my wits' end, I tried editing the generated Makefile directly, just to see
what effect I needed.  No luck, same pattern.  Even if $builddir/src/Makefile
has a direct assignment to GLIBCPP_INCLUDES before the generated INCLUDES
line, like

    GLIBCPP_INCLUDES = WAH WAH WAH WAH                  // manually added

    INCLUDES = [......] -I$(GLIBCPP_INCLUDES)           // generated

it has no effect.  The value of INCLUDES is being fetched from the builddir's
Makefile, not builddir/src's Makefile.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]