From: John L. <jla...@gm...> - 2006-08-29 02:40:23
|
I've added quite a few more comments to the wxCode/bakefiles/empty.bkl.template file to (hopefully) make it easier to understand. Please let me know if what I've written doesn't make sense or if there are other items that should be clarified. Secondly, I would really like to make it so that the library built for a component be given a name such as $(WXBASENAME)_mycomponent_name-$(WXRELEASE) to make it easier to link to, especially if you want to compile more than one version of them. We could use the same semantics as wxWidgets does where for example $(WXBASENAME) == 'wx-config --basename' == wx_gtk2ud for gtk, unicode, debug and then you would use <wx-lib>mycomp_name</wx-lib> in the bakefiles to get it. I have two problems with this, 1) where or how do you adjust the name of the created lib 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line in build/autoconf/wxpresets.m4 not work? WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $1,$WX_ADDITIONAL_LIBS --libs)" Thanks, John Labenski |
From: John L. <jla...@gm...> - 2006-08-29 04:09:41
|
On a more important note, there are some changes to the configure script and/or bakefiles that need to be made. 1) Makefile.in uses "-I./include" instead of "-I$(srcdir)/include" so that you cannot run configure from anywhere other than the root dir of the component. I cannot for the life of me figure out where this code comes from. 2) the generated configure script needs the lines mkdir -p lib mkdir -p samples/MYSAMPLE_NAME before the end, perhaps before "# end in a nice way the configure script" so that if you build from anywhere other than the root dir of the components these dirs exist. Again, it's easy enough to add to the generated configure script, but I cannot figure out where they should be added upstream. Thanks (Francesco :), John Labenski On 8/28/06, John Labenski <jla...@gm...> wrote: > I've added quite a few more comments to the > wxCode/bakefiles/empty.bkl.template file to (hopefully) make it easier > to understand. Please let me know if what I've written doesn't make > sense or if there are other items that should be clarified. > > Secondly, I would really like to make it so that the library built for > a component be given a name such as > $(WXBASENAME)_mycomponent_name-$(WXRELEASE) to make it easier to link > to, especially if you want to compile more than one version of them. > We could use the same semantics as wxWidgets does where for example > $(WXBASENAME) == 'wx-config --basename' == wx_gtk2ud for gtk, unicode, debug > and then you would use <wx-lib>mycomp_name</wx-lib> in the bakefiles to get it. > > I have two problems with this, > 1) where or how do you adjust the name of the created lib > 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line > in build/autoconf/wxpresets.m4 not work? > > WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS > $1,$WX_ADDITIONAL_LIBS --libs)" > > Thanks, > John Labenski > |
From: Francesco M. <f18...@ya...> - 2006-09-02 11:03:54
|
John Labenski ha scritto: > On a more important note, there are some changes to the configure > script and/or bakefiles that need to be made. > > 1) Makefile.in uses "-I./include" instead of "-I$(srcdir)/include" so > that you cannot run configure from anywhere other than the root dir of > the component. I cannot for the life of me figure out where this code > comes from. fixed > 2) the generated configure script needs the lines > mkdir -p lib > mkdir -p samples/MYSAMPLE_NAME > before the end, perhaps before "# end in a nice way the configure > script" so that if you build from anywhere other than the root dir of > the components these dirs exist. Again, it's easy enough to add to the > generated configure script, but I cannot figure out where they should > be added upstream. now targets.bkl declares some auxiliary targets which build the 'lib' folder, and all the COMP_SAMPLE_DIR* folders. For my components this is enough to make them work with the "../configure" trick. Francesco |
From: Francesco M. <f18...@ya...> - 2006-08-30 12:11:08
|
John Labenski ha scritto: > I've added quite a few more comments to the > wxCode/bakefiles/empty.bkl.template file to (hopefully) make it easier > to understand. Please let me know if what I've written doesn't make > sense or if there are other items that should be clarified. Thanks! I've checked it and found no errors except for the use of -- string as separator (which is not allowed within an XML file); I replaced them with ~~ > > Secondly, I would really like to make it so that the library built for > a component be given a name such as > $(WXBASENAME)_mycomponent_name-$(WXRELEASE) to make it easier to link > to, especially if you want to compile more than one version of them. > We could use the same semantics as wxWidgets does where for example > $(WXBASENAME) == 'wx-config --basename' == wx_gtk2ud for gtk, unicode, debug > and then you would use <wx-lib>mycomp_name</wx-lib> in the bakefiles to get it. Good point. I had noticed that this would be very useful lot of times but never found time. > > I have two problems with this, > 1) where or how do you adjust the name of the created lib Ok, I've added to wxhacks the wxlike-libname and wxlike-dllname tags so that now you can write: <lib id="keybinder_lib" template="complib" cond="WX_SHARED=='0'"> <wxlike-libname>keybinder</wxlike-libname> </lib> if you want your lib to be named to the "wx" manner. > 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line > in build/autoconf/wxpresets.m4 not work? > > WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS > $1,$WX_ADDITIONAL_LIBS --libs)" need to test it as autoconf format will require some work. In fact, I'm now trying to transfer some wxLua bakefile/m4 code to wxCode bakefiles/m4 but since with wxLua we're using a patched bakefile and wxCode not, the things are not easy and may require some time. If only my patches were applied to bakefile... (just daydreaming) Francesco |
From: John L. <jla...@gm...> - 2006-08-30 22:02:11
|
Thanks, I'll try to test it as soon as I get a chance. -John Labenski On 8/30/06, Francesco Montorsi <f18...@ya...> wrote: > John Labenski ha scritto: > > I've added quite a few more comments to the > > wxCode/bakefiles/empty.bkl.template file to (hopefully) make it easier > > to understand. Please let me know if what I've written doesn't make > > sense or if there are other items that should be clarified. > Thanks! I've checked it and found no errors except for the use of -- > string as separator (which is not allowed within an XML file); I > replaced them with ~~ > > > > > Secondly, I would really like to make it so that the library built for > > a component be given a name such as > > $(WXBASENAME)_mycomponent_name-$(WXRELEASE) to make it easier to link > > to, especially if you want to compile more than one version of them. > > We could use the same semantics as wxWidgets does where for example > > $(WXBASENAME) == 'wx-config --basename' == wx_gtk2ud for gtk, unicode, debug > > and then you would use <wx-lib>mycomp_name</wx-lib> in the bakefiles to get it. > Good point. I had noticed that this would be very useful lot of times > but never found time. > > > > > I have two problems with this, > > 1) where or how do you adjust the name of the created lib > Ok, I've added to wxhacks the wxlike-libname and wxlike-dllname tags so > that now you can write: > > <lib id="keybinder_lib" template="complib" cond="WX_SHARED=='0'"> > <wxlike-libname>keybinder</wxlike-libname> > </lib> > > if you want your lib to be named to the "wx" manner. > > > > 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line > > in build/autoconf/wxpresets.m4 not work? > > > > WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS > > $1,$WX_ADDITIONAL_LIBS --libs)" > need to test it as autoconf format will require some work. > > In fact, I'm now trying to transfer some wxLua bakefile/m4 code to > wxCode bakefiles/m4 but since with wxLua we're using a patched bakefile > and wxCode not, the things are not easy and may require some time. > > If only my patches were applied to bakefile... (just daydreaming) > > > Francesco > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > wxCode-users mailing list > wxC...@li... > https://lists.sourceforge.net/lists/listinfo/wxcode-users > |
From: John L. <jla...@gm...> - 2006-08-31 05:22:25
|
On 8/30/06, John Labenski <jla...@gm...> wrote: > > Thanks! I've checked it and found no errors except for the use of -- > > string as separator (which is not allowed within an XML file); I > > replaced them with ~~ Oops, I just got bakefile working in linux so I can test things now. I dunno what the problem I had with it was before, just got a clean copy and hacked away... > > > Secondly, I would really like to make it so that the library built for > > > a component be given a name such as > > > $(WXBASENAME)_mycomponent_name-$(WXRELEASE) to make it easier to link > > > to, especially if you want to compile more than one version of them. > > > We could use the same semantics as wxWidgets does where for example > > > $(WXBASENAME) == 'wx-config --basename' == wx_gtk2ud for gtk, unicode, debug > > > and then you would use <wx-lib>mycomp_name</wx-lib> in the bakefiles to get it. > > Good point. I had noticed that this would be very useful lot of times > > but never found time. > > > > > > > > I have two problems with this, > > > 1) where or how do you adjust the name of the created lib > > Ok, I've added to wxhacks the wxlike-libname and wxlike-dllname tags so > > that now you can write: > > > > <lib id="keybinder_lib" template="complib" cond="WX_SHARED=='0'"> > > <wxlike-libname>keybinder</wxlike-libname> > > </lib> > > > > if you want your lib to be named to the "wx" manner. Great! I added these lines to wxhacks.bkl to also get the unicode and debug syntax too. <set var="WXLIBPOSTFIX" cond="WX_UNICODE=='1'">$(WXLIBPOSTFIX)u</set> <set var="WXLIBPOSTFIX" cond="WX_DEBUG=='1'">$(WXLIBPOSTFIX)d</set> Officially they use somthing like this, for richtext, which is of a similar nature as a wxCode component. $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) > > > 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line > > > in build/autoconf/wxpresets.m4 not work? > > > > > > WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS > > > $1,$WX_ADDITIONAL_LIBS --libs)" > > need to test it as autoconf format will require some work. Grrrr!!! The wxWidgets bakefile has a check so if you do <wx-lib>sheet</wx-lib> to use the <wxlike-libname>sheet</wxlike-libname> sheet lib you get this error from bakefile_gen. ----------------------------------------------------------------------- Unknown wxWidgets library given in the wx-lib tag ----------------------------------------------------------------------- /home/john/lib/bakefile-0.2.0/share/bakefile/presets/wx_win32.bkl:299: error: an error occured during processing when processing target at /home/john/cvs/wxCode/wxCode/components/wxsheet/build/wxsheet.bkl:71 This is because they have this in wx.bkl, which doesn't even have richedit! <set var="LIB_LIST">base core net xml odbc xrc html adv media gl dbgrid qa</set> <set var="CONTRIBLIB_LIST">animate applet deprecated fl foldbar gizmos mmedia netutils ogl plot stc svg</set> <set var="ALLLIB_LIST">$(LIB_LIST) $(CONTRIBLIB_LIST)</set> and this in wx_win32.bkl and wx_unix.bkl <if cond="value not in ALLLIB_LIST.split()"> <error>Unknown wxWidgets library given in the wx-lib tag</error> </if> I have to give up now, since I cannot get the <wx-lib>adv</wx-lib> to get added to the Makefile.in and GNUmakefile. Same for html or any other wxlib. > > In fact, I'm now trying to transfer some wxLua bakefile/m4 code to > > wxCode bakefiles/m4 but since with wxLua we're using a patched bakefile > > and wxCode not, the things are not easy and may require some time. > > > > If only my patches were applied to bakefile... (just daydreaming) :) Thanks, John Labenski |
From: John L. <jla...@gm...> - 2006-09-01 02:09:50
|
On 8/31/06, John Labenski <jla...@gm...> wrote: > I have to give up now, since I cannot get the <wx-lib>adv</wx-lib> to > get added to the Makefile.in and GNUmakefile. Same for html or any > other wxlib. I think I found the problem. In build/autoconf/wxpresets.m4 we have AC_DEFUN([AM_WXPRESETS], ... WX_ADDITIONAL_LIBS="$2,core,base" I don't understand the syntax just yet, but for some reason $2 is not getting filled with any of the other wxlibs you set in the bakefile. Like these : <wx-lib>html</wx-lib> <wx-lib>adv</wx-lib> so that in GNUmakefile for example you only get `$(WX_CONFIG) --libs core,base` Sorry I can't fix this myself, but I'm slowly trying to learn this stuff. Thanks, John Labenski |
From: Francesco M. <f18...@ya...> - 2006-09-02 10:22:03
|
John Labenski ha scritto: > On 8/31/06, John Labenski <jla...@gm...> wrote: >> I have to give up now, since I cannot get the <wx-lib>adv</wx-lib> to >> get added to the Makefile.in and GNUmakefile. Same for html or any >> other wxlib. > > I think I found the problem. In build/autoconf/wxpresets.m4 we have > > AC_DEFUN([AM_WXPRESETS], > ... > WX_ADDITIONAL_LIBS="$2,core,base" > > I don't understand the syntax just yet, but for some reason $2 is not > getting filled with any of the other wxlibs you set in the bakefile. > Like these : > <wx-lib>html</wx-lib> > <wx-lib>adv</wx-lib> > > so that in GNUmakefile for example you only get > `$(WX_CONFIG) --libs core,base` > > Sorry I can't fix this myself, but I'm slowly trying to learn this stuff. everything is right. $2 comes from the 2nd argument of the AM_WXCODE_CHECKS([2.4.0], []) macro in the 'configure.ac' of each component. There are comments which should help to understand how to use it in all configure.ac files of wxCode. Adding the "adv,html" there will fix autoconf format. Unfortunately 'gnu' format is broken for wx2.6.x presets. I have submitted a patch (which has been already applied) to fix it in 2.7 so if you use wx2.7 presets you should be able to get also 'gnu' format to work. Francesco |
From: Francesco M. <f18...@ya...> - 2006-09-02 10:35:10
|
Francesco Montorsi ha scritto: > John Labenski ha scritto: >> On 8/31/06, John Labenski <jla...@gm...> wrote: >>> I have to give up now, since I cannot get the <wx-lib>adv</wx-lib> to >>> get added to the Makefile.in and GNUmakefile. Same for html or any >>> other wxlib. >> I think I found the problem. In build/autoconf/wxpresets.m4 we have >> >> AC_DEFUN([AM_WXPRESETS], >> ... >> WX_ADDITIONAL_LIBS="$2,core,base" >> >> I don't understand the syntax just yet, but for some reason $2 is not >> getting filled with any of the other wxlibs you set in the bakefile. >> Like these : >> <wx-lib>html</wx-lib> >> <wx-lib>adv</wx-lib> >> >> so that in GNUmakefile for example you only get >> `$(WX_CONFIG) --libs core,base` >> >> Sorry I can't fix this myself, but I'm slowly trying to learn this stuff. > everything is right. $2 comes from the 2nd argument of the > AM_WXCODE_CHECKS([2.4.0], []) > macro in the 'configure.ac' of each component. > > There are comments which should help to understand how to use it in all > configure.ac files of wxCode. Adding the "adv,html" there will fix > autoconf format. Another thing: if you have a dependency from a wxCode component X in your component Y you may want to use the AM_WXCODE_CHECKFOR_COMPONENT() autoconf macro in the configure.ac of the component Y to check for presence / usability of the component X. See wxcodechecks.m4 for more info. HTH, Francesco |
From: John L. <jla...@gm...> - 2006-09-01 21:07:37
|
On 8/31/06, John Labenski <jla...@gm...> wrote: > > > Ok, I've added to wxhacks the wxlike-libname and wxlike-dllname tags so > > > that now you can write: > > > > > > <lib id="keybinder_lib" template="complib" cond="WX_SHARED=='0'"> > > > <wxlike-libname>keybinder</wxlike-libname> > > > </lib> > > > > > > if you want your lib to be named to the "wx" manner. Ok, so how do I use these from a wxCode component that wants to link to a different component. I made another tag <define-tag name="wxlike-lib" rules="exe,lib,dll,module"> <if cond="TARGETING_WIN32=='1'"> <sys-lib>wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib> </if> <if cond="TARGETING_WIN32=='0'"> <sys-lib>wx_$(WX_PORT_WITHVERSION)$(WXLIBPOSTFIX)_$(value)-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)</sys-lib> </if> </define-tag> which I think is ok... You can see it and the results in wxthings and wxplotctrl. -John Labenski |
From: Francesco M. <f18...@ya...> - 2006-09-02 10:30:08
|
John Labenski ha scritto: > On 8/31/06, John Labenski <jla...@gm...> wrote: >>>> Ok, I've added to wxhacks the wxlike-libname and wxlike-dllname tags so >>>> that now you can write: >>>> >>>> <lib id="keybinder_lib" template="complib" cond="WX_SHARED=='0'"> >>>> <wxlike-libname>keybinder</wxlike-libname> >>>> </lib> >>>> >>>> if you want your lib to be named to the "wx" manner. > > Ok, so how do I use these from a wxCode component that wants to link > to a different component. > > I made another tag > > <define-tag name="wxlike-lib" rules="exe,lib,dll,module"> > <if cond="TARGETING_WIN32=='1'"> > <sys-lib>wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib> > </if> > <if cond="TARGETING_WIN32=='0'"> > <sys-lib>wx_$(WX_PORT_WITHVERSION)$(WXLIBPOSTFIX)_$(value)-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)</sys-lib> > </if> > </define-tag> > > which I think is ok... You can see it and the results in wxthings and > wxplotctrl. Thanks! I didn't make such a tag up to now because wxCode components usually used the simple 'compname$(WXLIBPOSTFIX)' libname syntax and that didn't require a specific tag. Now that we added wxlike-[lib|dll]name such tag is definitely required, too. Thanks, Francesco |
From: Francesco M. <f18...@ya...> - 2006-09-02 10:16:51
|
Hi John, sorry for the delay - I'm going to revise wxCode bakefiles right now. John Labenski ha scritto: >>> if you want your lib to be named to the "wx" manner. > > Great! I added these lines to wxhacks.bkl to also get the unicode and > debug syntax too. > > <set var="WXLIBPOSTFIX" cond="WX_UNICODE=='1'">$(WXLIBPOSTFIX)u</set> > <set var="WXLIBPOSTFIX" cond="WX_DEBUG=='1'">$(WXLIBPOSTFIX)d</set> thanks ! I added these to the wxhacks.bkl of wxLua but not to wxCode's one. To keep the two files as similar as possible I've just replaced these two lines with the relative block taken from wxLua's bakefile. > Officially they use somthing like this, for richtext, which is of a > similar nature as a wxCode component. > $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) yes, WXLIBPOSTFIX is very important in order to get libraries correctly named - I would have noticed it before if only I had time to work on wxCode components recently. >>>> 2) would <wx-lib>mycomp_name</wx-lib> really work or would this line >>>> in build/autoconf/wxpresets.m4 not work? >>>> >>>> WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS >>>> $1,$WX_ADDITIONAL_LIBS --libs)" >>> need to test it as autoconf format will require some work. > > Grrrr!!! The wxWidgets bakefile has a check so if you do > <wx-lib>sheet</wx-lib> to use the > <wxlike-libname>sheet</wxlike-libname> sheet lib you get this error > from bakefile_gen. > > ----------------------------------------------------------------------- > Unknown wxWidgets library given in the wx-lib tag > ----------------------------------------------------------------------- > > /home/john/lib/bakefile-0.2.0/share/bakefile/presets/wx_win32.bkl:299: > error: an error occured during processing > when processing target at > /home/john/cvs/wxCode/wxCode/components/wxsheet/build/wxsheet.bkl:71 > > This is because they have this in wx.bkl, which doesn't even have richedit! > > <set var="LIB_LIST">base core net xml odbc xrc html adv media gl > dbgrid qa</set> > <set var="CONTRIBLIB_LIST">animate applet deprecated fl foldbar > gizmos mmedia netutils ogl plot stc svg</set> > <set var="ALLLIB_LIST">$(LIB_LIST) $(CONTRIBLIB_LIST)</set> > > and this in wx_win32.bkl and wx_unix.bkl > > <if cond="value not in ALLLIB_LIST.split()"> > <error>Unknown wxWidgets library given in the wx-lib tag</error> > </if> ehm, I know of those checks as I submitted them in wxpresets :| Sure it's missing richedit. It was added after I submitted my patch to wxpresets. BTW, relatively also to my SoC project, I'm going to try to push wx developers to embed some changes to wxpresets, basically all stuff in the "wxhacks.bkl" files and maybe, wxpresets.m4, directly in wx presets. That would be great as currently I have to try to keep synch all those files in all wx-based projects I work on. > I have to give up now, since I cannot get the <wx-lib>adv</wx-lib> to > get added to the Makefile.in and GNUmakefile. Same for html or any > other wxlib. I'll reply to this in your other mail. Francesco |