From: John L. <jla...@gm...> - 2005-11-20 16:53:57
|
On 11/20/05, Francesco Montorsi <f18...@ya...> wrote: > > The build system is not perfect yet; I'm trying to look what's wrong in > > the bakefiles looking in your hand-written Makefile... > I've found that both with your hand-written makefile and my bakefile I ge= t these errors: > ./../modules/wxbind/include/wxbind.h:64:30: error: wx/fl/controlbar.h: No= such file or > directory ... > when compiling modules/wxlua/src/internal.cpp; I understand that these ar= e because I > haven't compiled & installed FL from wxWidgets. > However my bindings/wxwidgets/luasetup.h script says Ok, so I just run configure in a sub dir of wxWidgets and don't install it, so the includes in wxbind.h all exist in original wxWidgets tree, but we should get this working for the case where you install it too. cd wxWidgets/config_gtk2 ../configure \ --prefix=3D/home/john/wx/wxWidgets/wxCVS/wxWidgets/config_gtk2 \ --enable-optimise=3Dno \ ... > #define wxLUA_USE_FL 0 > but for some reason, internal.cpp includes luasetup.h.in: > #include "../../../bindings/wxwidgets/luasetup.h.in" // get the base libr= ary setup parameters > which instead has a: > #define wxLUA_USE_FL 1 I think the solution to making it possible to have multiple version of the wxlua bindings for different projects lies in making the compiler include luasetup.h for us. In modules/wxbind/src/Makefile I've done this. WXLUASETUP =3D luasetup.h ... .cpp.o: $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS)-o $@ $= < so when you run $make WXLUASETUP=3D../path/to/your/luasetup.h you can use your own luasetup.h file. I couldn't find the equivalent for gcc's "-include" using nmake (MS's compiler). Does anyone know if *all* compilers have this capability? I assume yes? If they all do, then we can remove all #include "luasetup.h" and add this at the top of modules/wxbind/include/wxbind.h #ifndef __WXLUA_SETUP__ // <-- set when luasetup.h is parsed #error "You must include luasetup.h on the command line for you compile= r" // In order to support multiple builds of the wxlua bindings, each having different // bindings included, you must include the file "luasetup.h" on the command line // when you compile. Please see docs/?? (not written) // gmake : $make WXLUASETUP=3D../path/to/your/luasetup.h // nmake : $nmake.exe -f makefile.vc ??? // and so on #endif // __WXLUA_SETUP__ This should be pretty self explanitory. We could be less strict and just #include a default luasetup.h, but people could get compile errors and if they don't read the docs (not yet written) and get frustrated. We also need to do the same for the output library path and name, so people can override them on the commandline or their own Makefiles for their project. See also wxbind/src/Makefile (these should be renamed to WXBIND_TARGET_LIB.= ..) TARGET_LIBNAME =3D lib$(WXLIBBASE)_wxluabind-$(WXRELEASE) TARGET_LIBDIR =3D $(WXDIR)/lib =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D So... the one question remains, do all compilers support something equivalent to gcc's "-include" directive? Also, can bakefile handle this sort of thing? Regards, John Labenski |